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

Home -> Community -> Usenet -> c.d.o.misc -> Re: trigger error

Re: trigger error

From: Ken Denny <ken_at_kendenny.com>
Date: 7 Jan 2004 05:52:16 -0800
Message-ID: <ba944bc3.0401070552.697fbc3@posting.google.com>


Sybrand, There's one bit of incorrect information in your response.

Sybrand Bakker <gooiditweg_at_sybrandb.demon.nl> wrote in message news:<aq3mvvopr8fmej7kvl89vgjisier3ikhbq_at_4ax.com>... [snip]
> 3 I don't see why you can't insert a new record with one single
> statement. Anyway the extra update should be avoided. Also IIRC, you
> will not reach the SQL%NOTFOUND test, but you will simply run into the
> NO_DATA_FOUND exception when you don't update any record.
> Performancewise you would better check the existence of the record,
> instead of trapping the notfound exception

An update statement which doesn't update any rows will not cause a no_data_found exception. To check whether any rows were updated you must check if SQL%ROWCOUNT = 0 after the UPDATE operation.

Ken Denny Received on Wed Jan 07 2004 - 07:52:16 CST

Original text of this message

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