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: First

Re: First

From: Daniel Morgan <damorgan_at_x.washington.edu>
Date: Thu, 05 Aug 2004 19:43:40 -0700
Message-ID: <1091760257.481557@yasure>


Joel Garry wrote:

> "Michel Cadot" <micadot{at}altern{dot}org> wrote in message news:<411247af$0$1888$636a15ce_at_news.free.fr>...
> 

>>"Alan" <alan_at_erols.com> a écrit dans le message de news:2nesn5F53etU1_at_uni-berlin.de...
>>
>>>"Daniel Morgan" <damorgan_at_x.washington.edu> wrote in message
>>>news:1091677677.736929_at_yasure...
>>>
>>>>Peter Plumber wrote:
>>>>
>>>>
>>>>>Hi,
>>>>>
>>>>>Does Qracle 9i support a SELECT that returns
>>>>>only a subset of the records
>>>>>
>>>>>something link
>>>>>
>>>>>SELECT FIRST 1 * FROM tablename
>>>>>
>>>>>thx
>>>>>
>>>>>Peter
>>>>
>>>>Have to confess that I am really disappointed with the responses from
>>>>Michel, Hans, Rene, and Turkbear because not one gave the answer I
>>>>was going to give. And I was sure as I read through theirs that one or
>>>>all of them would have done it first ... so here's mine:
>>>>
>>>>CREATE TABLE t AS
>>>>SELECT object_name
>>>>FROM all_objects
>>>>WHERE rownum < 81;
>>>>
>>>>SELECT COUNT(*)
>>>>FROM t;
>>>>
>>>>SELECT *
>>>>FROM t
>>>>SAMPLE (25);
>>>>
>>>>Returns 25% of the rows.
>>>>
>>>>--
>>>>Daniel A. Morgan
>>>>University of Washington
>>>>damorgan_at_x.washington.edu
>>>>(replace 'x' with 'u' to respond)
>>>>
>>>
>>>I am disapopinted with all of you. The correct answer is, "There is no such
>>>thing as "first", as tables are (unordered) sets. So, what is it you
>>>_really_ need to do?"
>>>
>>>
>>
>>Sorry to disagree with you but there is always "first" even when there is no order.
>>At least it the first ones to be displayed whichever these rows may be.
>>And from which Daniel's not so bad answer ;) as first ones may be any ones else.
> 
> 
> I am disappointed no one said
> http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&th=70727e9f12892e73&rnum=2
> 
> (Funnily enough, searching the orafaq.com for first rows did bring
> that up, so RTFF would be a good answer too.)
> 
> jg
> --
> @home.com is bogus.
> $Million in prizes to convert to Ingres: 
> http://informationweek.com/shared/printableArticle.jhtml?articleID=26805678
> They should call it the Big Penis Prize.  <Insert preDICtable comment
> about CA here>


Once again ... reread the OP's post. The request never once indicated an interest in first anything. FIRST only occurs in some crude pseudocode. It is not in the description of what was requested.

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace 'x' with 'u' to respond)
Received on Thu Aug 05 2004 - 21:43:40 CDT

Original text of this message

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