?? scroll.sql
字號:
--聲明 SCROLL 游標并使用其它 FETCH 選項
--下例創建一個 SCROLL 游標,使其通過 LAST、PRIOR、RELATIVE 和 ABSOLUTE 選項支持所有滾動能力。
USE pubs
GO
-- Execute the SELECT statement alone to show the
-- full result set that is used by the cursor.
SELECT au_lname, au_fname FROM authors
ORDER BY au_lname, au_fname
-- Declare the cursor.
DECLARE authors_cursor CURSOR SCROLL FOR -- FORWARD_ONLY
SELECT au_lname, au_fname FROM authors
ORDER BY au_lname, au_fname
OPEN authors_cursor
-- Fetch the last row in the cursor.
FETCH NEXT FROM authors_cursor
FETCH FIRST FROM authors_cursor
FETCH NEXT FROM authors_cursor
FETCH PRIOR FROM 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
-- Fetch the row that is two rows prior to the current row.
FETCH last FROM authors_cursor
CLOSE authors_cursor
DEALLOCATE authors_cursor
GO
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -