In this PL/SQL statement, which of the following lines will produce an error?
-
cursor CAPITALS is
-
select CITY, STATE
-
into my_city, my_state
-
from CITIES
-
where CAPITAL = 'Y';
C
Correct answer
Explanation
The INTO clause must come after the SELECT statement's column list but before the FROM clause. The correct order in a cursor declaration is: CURSOR name IS SELECT column_list INTO variable_list FROM table WHERE condition. The 'into my_city, my_state' line is misplaced in the structure.