sql语句:if exists语句使用

if exists(select * from test.dbo.test1 where a='1')
begin
print('exists ')
end
else
    begin
      print('no exists ')
    end
go

 

posted @ 2015-09-15 11:31  甜菜波波  阅读(3548)  评论(0编辑  收藏  举报