0print 大 --begin end結(jié)構(gòu)begin end用途 設(shè)定一個程序塊,進(jìn)行批處理if 1>0beginprint 大 end--case 語句 有返回值declare @a int ,@b c..."/>
您好,登錄后才能下訂單哦!
--if else
if 1>0
print '大'
--begin end結(jié)構(gòu)
begin end用途 設(shè)定一個程序塊,進(jìn)行批處理
if 1>0
begin
print '大'
end
--case 語句 有返回值
declare @a int ,@b char(10)
set @a=1
set @b=case
when @a>0
then '大于零'
when @a<0
then '小于零'
else
'等于零'
end
print @b
--while 循環(huán)
--和C#一樣可以使用 break和continue關(guān)鍵字控制循環(huán)的執(zhí)行
declare @a int
set @a=0
while @a<10
begin
set @a=@a+1
if @a=4
break
else
print @a
continue
end
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。