当前位置:Gxlcms > 数据库问题 > sql-编程语句

sql-编程语句

时间:2021-07-01 10:21:17 帮助过:13人阅读

sql_编程语句:

declare @a int;

set @a = 1;  赋值

declare @b = 2

select @a; 输出一下 必须全部选中执行 消息里面一行受影响 不打出 1 来

print @a; 也是输出  消息里面会打出个 1 来

 set @a = max(degree) from score;    也是赋值的方式

 

if @a > @b

bedin

select  ‘a大于b‘

print  ‘xxxxxxx‘

end                                  begin 和end相当于()

else

select  ‘a小于b‘

 

while @a<=3

set   @a = @a + 1

select @a;

 输出是4

sql-编程语句

标签:输出   影响   xxx   set   gre   xxxx   int   大于   end   

人气教程排行