国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 數據庫 > SQL Server > 正文

SQL Server 2000游標使用方法

2024-08-31 00:48:08
字體:
來源:轉載
供稿:網友

游標使用方法:
use db1
declare my_cursor cursor scroll dynamic /*scroll表示可隨意移動游標指針(否則只能向前),dynamic表示可以讀寫游標(否則游標只讀)*/
for
select 姓名 from 個人資料

open my_cursor
declare @name sysname
fetch next from my_cursor into @name
while(@@fetch_status=0)
  begin
    print '姓名: ' + @name
    fetch next from my_cursor into @name
  end
fetch first from my_cursor into @name
print @name
/* update 個人資料 set 姓名='zzg' where current of my_cursor */
/* delete from 個人資料 where current of my_cursor */
close my_cursor
deallocate my_cursor
正文 

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 万荣县| 浙江省| 保靖县| 丰城市| 蒙城县| 达日县| 正宁县| 黄陵县| 黔南| 寿光市| 铜山县| 南雄市| 潮安县| 上饶市| 黄陵县| 祁门县| 松潘县| 科技| 鄂温| 平陆县| 成都市| 洪泽县| 龙海市| 科尔| 鸡西市| 邻水| 同德县| 杂多县| 清镇市| 嵩明县| 开远市| 兴和县| 信丰县| 遂川县| 科技| 金堂县| 大关县| 永登县| 荃湾区| 磐石市| 青冈县|