Example: DECLARE SC CURSOR STATIC FOR SELECT * FROM DEPT
OPEN SC
FETCH FIRST FORM SC
10 SALES LONDON
UPDATE DEPT SET DEPTNO=15 WHERE DEPTNO=10
FETCH FIRST FROM SC
10 SALES LONDON
FETCH ABSOLUTE -2 FROM SC
30 IR BAN
FETCH FIRST FROM SC
15 SALES LONDON
FETCH RELATIVE 2 FROM SC
30 IR BAN
FETCH RELATIVE -2 FROM SC
15 SALES LONDON
CLOSE SC
DEALLOCATE SC

No comments:
Post a Comment