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: How to do this in SQL?

Re: How to do this in SQL?

From: Brian Peasland <peasland_at_edcmail.cr.usgs.gov>
Date: Fri, 20 Aug 1999 13:35:40 GMT
Message-ID: <37BD59AC.92DABB31@edcmail.cr.usgs.gov>


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

Original text of this message

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