Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to do this in SQL?
Try:
SELECT * FROM (
SELECT * FROM history WHERE login='toto' ORDER BY d DESC)
WHERE ROWNUM <= 10;
HTH
Brian
Eric Dantie wrote:
>
> I've got a table history(login varchar2(30), d date)
>
> Each time someone connect to me, I do a insert into history(loginvalue,
> sysdate);
>
> I need the 10 lasts connections for the login 'toto'.
>
> How can I do this?
>
> Thanks in advance.
>
> Eric
Received on Fri Aug 20 1999 - 08:35:40 CDT