Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: ROWNUM question??
Try this SQL-query:
select ename
from (select distinct -ename e2, ename from emp)
where rownum<=1
;
Oscar Paredes пишет в сообщении <36A4E33D.74474199_at_fib.upc.es> ...
>
>Hi all!
>
>I want to select the first row of a SELECT statement
>that have a ORDER BY, like:
>
> select e.name
> from employee e
> where rownum=1
> order by e.name
>
>But,... unfortunatelly... this don't work!! :-(
>
>Someone know how to do this????
>
>
>Thanks,
>Oscar
>
Received on Thu Jan 21 1999 - 03:02:16 CST