Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> SELECT INTO Return > 1 rows
I am new to PLSQL. Here is a sample code from a textbook. Is the ELSE
checking for 'error > 1 rows' necessary ? As far I know if there are > 1
rows returned in the SELECT INTO, an exception would be raised before we can
check if %ROWCOUNT >1.
DECLARE
v_city zipcode.city%type;
BEGIN
SELECT city
INTO v_city FROM zipcode
ELSE
DBMS_OUTPUT.PUT_LINE('error > 1 rows'); /*would this be executed at
all?*/
END IF;
END;
Received on Fri Jun 10 2005 - 01:16:50 CDT