码迷,mamicode.com
首页 > 数据库 > 详细

SqlServer游标操作

时间:2019-09-10 13:27:22      阅读:104      评论:0      收藏:0      [点我收藏+]

标签:dealloc   sqlserver   order   begin   print   server   lse   serve   fetch   

CLOSE orderNum_02_cursor
deallocate orderNum_02_cursor
DECLARE orderNum_02_cursor cursor SCROLL for select vcThemeId from LG_LiveTheme_Order
DECLARE @themeid varchar(10)
OPEN orderNum_02_cursor
fetch first from orderNum_02_cursor INTO @themeid
WHILE @@FETCH_STATUS=0
BEGIN
PRINT @themeid
FETCH NEXT FROM orderNum_02_cursor INTO @themeid
END

CLOSE orderNum_02_cursor
deallocate orderNum_02_cursor

SqlServer游标操作

标签:dealloc   sqlserver   order   begin   print   server   lse   serve   fetch   

原文地址:https://www.cnblogs.com/bwdblogs/p/11496653.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!