May 2000
Intermediate to advanced
594 pages
11h 32m
English
10-6. | Which of the following strings are valid cursor attributes (which means they are “attached” as a suffix to the name of the cursor)?
|
10-7. | Which of the following uses of cursor attributes are valid? If they are not valid, what is the problem? Assume that the following cursor is declared in the same block when referenced in the problems: CURSOR possibly_in_danger_cur IS
SELECT status
FROM genetically_modified_foods
WHERE product = 'CORN'
AND animal = 'MONARCH BUTTERFLY';
|
10-8. | What is wrong with the following code? Will you eventually run out of open cursors in the session if you execute this program, say, 100,000 times? CREATE OR REPLACE FUNCTION totalsales (year_in IN INTEGER) RETURN NUMBER IS CURSOR sales_cur IS SELECT SUM (amt) FROM ...; total NUMBER; BEGIN OPEN sales_cur; FETCH sales_cur INTO total; RETURN total; CLOSE sales_cur; ... |