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: SQL - Select 1 row only from a table.

Re: SQL - Select 1 row only from a table.

From: Daniel Morgan <damorgan_at_x.washington.edu>
Date: Wed, 31 Mar 2004 21:59:13 -0800
Message-ID: <1080799132.963284@yasure>


Thomas Niering wrote:

> Hallo Craig,
>
>

>>select (1)
>>from table
>>where column = x'
>> and rownum = 1

>
> ?!?
>
> Ciao Thomas

Not as efficient as:

SELECT 1
FROM dual
WHERE EXISTS (<your statement here>)

-- 
Daniel Morgan
http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp
http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp
damorgan_at_x.washington.edu
(replace 'x' with a 'u' to reply)
Received on Wed Mar 31 2004 - 23:59:13 CST

Original text of this message

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