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: Retrieving first row of a query in Oracle SQL

Re: Retrieving first row of a query in Oracle SQL

From: digory <digory_at_gmx.net>
Date: Wed, 29 Aug 2007 23:30:38 -0700
Message-ID: <1188455438.786523.111730@g4g2000hsf.googlegroups.com>


> SELECT id, dat, cnt, stuff
> FROM T
> WHERE (cnt,dat) IN (
> SELECT MIN (cnt), MIN(dat)
> FROM T
> WHERE dat = (
> SELECT MIN(dat)
> FROM T
> )
> )

That isn't simpler either. Actually, the innermost WHERE clause is redundant, isn't it? Received on Thu Aug 30 2007 - 01:30:38 CDT

Original text of this message

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