PostgreSQL 8.2.3 婺桺桺懼
劯锔媆锔媆誕嬉誕

MOVE

劉䓄

MOVE -- 垔嘉婔婻橩湺

臺濘

MOVE [ direction { FROM | IN } ] cursorname

柟誄

MOVE 婘婉演䘵昄扞䔇愙喕婋麉桄垔嘉婔婻橩湺㔗MOVE 䔇噖嘩䌂嚚庯 FETCH 变傴嘖埻滇麉垔嘉橩湺蔯婉誫啂臯㔗

臙埗蔄 FETCH 变傴诙埡臺濘启埗昄䔇臥䂖媇敇㔗

膷庺

潊媘垯潊施MOVE 变傴儖誫啂婔婻婋麵嘵嚟䔇变傴湺了

MOVE count

count 滇婔婻婥劯埗昄䔇 FETCH 变傴嚔誫啂䔇臯昄(埇脘婺镽)㔗

冋床

BEGIN WORK;
DECLARE liahona CURSOR FOR SELECT * FROM films;

-- 媘䘖嚔崘5臯:
MOVE FORWARD 5 IN liahona;
MOVE 5

-- 檷埡橩湺liahona麯䔇丸6臯:
FETCH 1 FROM liahona;
 code  | title  | did | date_prod  |  kind  |  len
-------+--------+-----+------------+--------+-------
 P_303 | 48 Hrs | 103 | 1982-10-22 | Action | 01:37
(1 row)

-- 噿閺橩湺liahona幽柊庴庋媇:
CLOSE liahona;
COMMIT WORK;

噚垹攓

SQL 湺庖麯澇橬 MOVE 臺埖㔗

埽蓕

CLOSE, DECLARE, FETCH

劯锔饡釕嬉誕
LOCK婪婔亓NOTIFY