Sql Serverの使用基準
712 ワード
もっと読む
, , LOCAL ,
(GLOBAL, ) ; ,
FORWARD_ONLY READ_ONLY STATIC ,
--For example:
DECLARE your_cursor CURSOR
LOCAL
STATIC
FORWARD_ONLY
READ_ONLY
FOR
SELECT …
OPEN your_cursor
FETCH NEXT FROM cur INTO @your_variable….
WHILE @@fetch_status = 0
BEGIN
-- Put your code here to use @your_variable….
FETCH NEXT FROM cur INTO @your_variable….
END
CLOSE your_cursor
DEALLOCATE your_cursor