Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Different behavior of Too_many_rows exception in pl/sql between v7&v8i

Different behavior of Too_many_rows exception in pl/sql between v7&v8i

From: <Prasada.Gunda1_at_hartfordlife.com>
Date: Thu, 21 Jun 2001 11:34:42 -0700
Message-ID: <F001.003326B6.20010621113402@fatcity.com>

We noticed a different behavior with too_many_rows exception in v7 and v8i. Is this a bug or that's the way it should work in 8i?

I really appreciate your feedback on this. Thanks & Regards,
Prasad

declare
v_table_name user_tables.table_name%TYPE; begin
v_table_name := null;
select table_name
into v_table_name
from user_tables;
dbms_output.put_line('v_table_name : '||nvl(v_table_name,'null')); exception
when too_many_rows then

    dbms_output.put_line('too_many_rows exception, v_table_name : ' ||nvl(v_table_name,'null'));
when others then

    dbms_output.put_line(sqlerrm);
end;
/

In v7.3, It keeps value remains null in v_table_name column and v8i it is assigning the first received value.
In both cases, It is raising too_many_rows exception.

Output in v7.3:

too_many_rows exception, v_table_name : null

PL/SQL procedure successfully completed.

Output in v8.1.7, v8.1.6, v8.1.5

too_many_rows exception, v_table_name : CHAMPION_LIFE_DGNSS_CATEGORY

PL/SQL procedure successfully completed.

--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author:
  INET: Prasada.Gunda1_at_hartfordlife.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Thu Jun 21 2001 - 13:34:42 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US