pony

抄袭是一种美德

SQL Server游标举例

DECLARE authors_cursor SCROLL CURSOR FOR
SELECT au_lname, au_fname FROM authors
ORDER BY au_lname, au_fname
OPEN authors_cursor

-- Fetch the second row in the cursor. --绝对位置
FETCH ABSOLUTE 2 FROM authors_cursor

-- Fetch the row that is three rows after the current row. --相对位置
FETCH RELATIVE 3 FROM authors_cursor

此例子是pubs 里的
将其换入你的数据库就行了

posted on 2008-09-22 15:26  马森  阅读(328)  评论(0编辑  收藏  举报

导航