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

Home -> Community -> Usenet -> c.d.o.server -> Re: count(*) vs. a cursor when determining the existing record on primary key

Re: count(*) vs. a cursor when determining the existing record on primary key

From: Sybrand Bakker <gooiditweg_at_sybrandb.demon.nl>
Date: Fri, 20 Jun 2003 20:19:18 +0200
Message-ID: <gnj6fvsrvsgamvf1gfbh3dbfm80cl6ev4h@4ax.com>


On 20 Jun 2003 10:15:56 -0700, javapda_at_yahoo.com (jgk) wrote:

>With regard to the example without a cursor above,
>won't you get an exception thrown any time you do the query
>and there is no matching data?

sure you will. no_data_found
And the approach is inefficient to as a select into always performs 2 fetches
1 to cater for 'NO DATA FOUND'
2 the second to cater for 'TOO MANY ROWS'

Sybrand Bakker, Senior Oracle DBA

To reply remove -verwijderdit from my e-mail address Received on Fri Jun 20 2003 - 13:19:18 CDT

Original text of this message

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