SQL Server 中的if...else...结构,sqlif...else..
use yuyongTest
--exists:如果查询语句返回至少一行数据则返回true,否则返回false
if exists(select * from student where number=(-1))
print('Y');
else
print('N');
if exists(select * from student where number>=(-1))
print('Y');
else
print('N');
本站文章为和通数据库网友分享或者投稿,欢迎任何形式的转载,但请务必注明出处.
同时文章内容如有侵犯了您的权益,请联系QQ:970679559,我们会在尽快处理。