日韩无码专区无码一级三级片|91人人爱网站中日韩无码电影|厨房大战丰满熟妇|AV高清无码在线免费观看|另类AV日韩少妇熟女|中文日本大黄一级黄色片|色情在线视频免费|亚洲成人特黄a片|黄片wwwav色图欧美|欧亚乱色一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務(wù)時(shí)間:8:30-17:00
你可能遇到了下面的問題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
SQL中游標(biāo)嵌套循環(huán)的示例

SQL中經(jīng)常要用到循環(huán),下面就將為您介紹SQL中游標(biāo)嵌套循環(huán)的示例,供您參考,希望對(duì)您學(xué)習(xí)SQL的循環(huán)有所幫助。

create table #temp(a int,b int)

insert into #temp
select 1,2
insert into #temp
select 3,4
select * from #temp
declare @i int,
   @j int
declare cur1 cursor for
select a from #temp
open cur1
fetch cur1 into @i
while @@fetch_status =0
begin
select 'cur1:',@i
declare cur2 cursor for
   select b from #temp
open cur2
fetch cur2 into @j
while @@fetch_Status =0
begin
   select 'cur2:',@j
   fetch cur2 into @j
end
close cur2
deallocate cur2
fetch cur1 into @i
end
close cur1
drop table #temp
deallocate cur1

【編輯推薦】

sql循環(huán)插入的語句寫法

SQL循環(huán)語句的妙用

SQL中CONVERT函數(shù)詳解

SQL中DateDiff函數(shù)的使用

刪除SQL約束的方法


分享題目:SQL中游標(biāo)嵌套循環(huán)的示例
網(wǎng)站地址:http://www.5511xx.com/article/dppphsh.html