-- select * from @TempTable order by ID
DECLARE @ID varchar(120)
-- DECLARE InfoCursor CURSOR FAST_FORWARD
DECLARE InfoCursor CURSOR FAST_FORWARD FORWARD_ONLY READ_ONLY
FOR
SELECT ID FROM @TempTable WITH(NOLOCK) ORDER BY MEM_ID
OPEN InfoCursor
FETCH NEXT FROM InfoCursor INTO @ID
WHILE @@FETCH_STATUS = 0
BEGIN
-- 작업 구문 --
select * from @TempTable where ID = @ID FETCH NEXT FROM InfoCursor INTO @ID
END
CLOSE InfoCursor
DEALLOCATE InfoCursor
END
CLOSE InfoCursor
DEALLOCATE InfoCursor
댓글 없음:
댓글 쓰기