Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: trigger error
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
![]() |
![]() |