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: What syntax better (faster,cool)!

Re: What syntax better (faster,cool)!

From: Bryan Lenihan <lenihan_at_bellsouth.net>
Date: Mon, 07 Dec 1998 10:31:40 GMT
Message-ID: <366BAE1B.9E0103B4@bellsouth.net>


sokol,

     It depends on the number of rows that you are wanting to process.

The : elect COL into VAR from TABLE; will give you an error if there are more than one row that is returned. However, if there is only one row this is a cleaner way and more effient because you are using an internal implicit cursor.

However, if you are wanting to process more than one row, you have to use the explicit cursor routine. This requires more on the database bacuse of the cursor values and memory that is used.

I hope that this helps you,
Thanks,
Bryan Lenihan

sokol_at_opsb.ru wrote:

> select COL into VAR from TABLE;
>
> or
>
> open CURSOR;
> fetch COL into VAR;
> close CURSOR;
>
> Tanks.
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own


Received on Mon Dec 07 1998 - 04:31:40 CST

Original text of this message

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