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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Testing row existence in PL/SQL block?

Re: Testing row existence in PL/SQL block?

From: Mark Townsend <markbtownsend_at_home.com>
Date: Sat, 21 Jul 2001 19:13:39 GMT
Message-ID: <B77F2273.AD0E%markbtownsend@home.com>

in article 9jbtpv0l0d_at_drn.newsguy.com, Thomas Kyte at tkyte_at_us.oracle.com wrote on 7/21/01 5:50 AM:

> In article <0W167.1225$ym4.45349_at_iad-read.news.verio.net>, gamma_at_clark.net
> says...

>>
>> I have a PL/SQL block that looks sorta like this:
>>
>> declare
>> e int;
>> begin
>> select count(*) into e from SomeTable
>> where SomeConditions;
>> if e=0
>> DoSomething
>> else
>> DoSomethingElse
>> end if;
>> DoMoreStuff;
>> end;

Just on the off-chance that the DoSomethings involve data merge type operations, you may also want to look at the new MERGE syntax in Oracle9i - http://download-west.oracle.com/otndoc/oracle9i/901_doc/server.901/a90237/tr ansfor.htm Received on Sat Jul 21 2001 - 14:13:39 CDT

Original text of this message

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