Multiple choice technology databases

In this PL/SQL statement, which of the following lines will produce an error?

  1. cursor CAPITALS is

  2. select CITY, STATE

  3. into my_city, my_state

  4. from CITIES where CAPITAL = 'Y';

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

In a cursor declaration, the INTO clause is not part of the SELECT statement. The INTO clause is used with explicit cursors only when combined with a FETCH statement to retrieve rows into variables. A cursor definition should only contain SELECT-FROM-WHERE (and other clauses like GROUP BY, ORDER BY), but not INTO.