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: Paul Brinkley <laugh_at_starpower.net>
Date: Mon, 23 Jul 2001 19:59:28 GMT
Message-ID: <3b5c7fcb.229187093@news.starpower.net>

Thomas Kyte <tkyte_at_us.oracle.com> wrote:

>gamma_at_clark.net says...
>>In summary, the block does one of two things depending on whether
>>at least one row exists in SomeTable with certain conditions. The
>>trouble is that the block seems inefficient; it counts all of the
>>rows, but actually I can stop as soon as I find one. (Often it's
>>even the case that there will be one row at most.)
>>Any ideas?
>>
>
>A fast and EXPRESSIVE way to do this (a method that is somewhat self
>documenting) is:
>[snip]

Perfect. I prefer the expressive methods (I like being able to understand my code 10 years after I've written it). So much so that if it has to be fast and cryptic, I'll tend to document the crud out of it.

[In the process of switching accounts, and news clients also as a result. Hopefully this post won't be wrapped in a bunch of HTML...] Received on Mon Jul 23 2001 - 14:59:28 CDT

Original text of this message

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