retrieve top 10 records

Last post 08-18-2003 9:45 AM by Konda GR. 2 replies.

Sort Posts:

  • retrieve top 10 records

    08-18-2003, 8:21 AM
    • Member
      85 point Member
    • Konda GR
    • Member since 07-08-2003, 5:24 AM
    • London, UK
    • Posts 17
    Hi,

    I know its very simple. But I have very archive knowledge in oracle (last time I used is in 1999).

    I would like to know - how to retrive top 10 records from a table.

    In SQL Server its like this - select top 10 * from table_name

    Any help, appreciated.

    Thanks in advance
  • Re: retrieve top 10 records

    08-18-2003, 9:30 AM
    Locked
    • Member
      85 point Member
    • Konda GR
    • Member since 07-08-2003, 5:24 AM
    • London, UK
    • Posts 17
    I got the answer.

    I was bit lazy before my lunch.

    Thanks any how,

    Of course you know the answer. Its like -
    select * from ut_lookup_types where rownum<11;
  • Re: retrieve top 10 records

    08-18-2003, 9:43 AM
    • Contributor
      2,540 point Contributor
    • Stephen Vakil
    • Member since 03-14-2003, 2:11 PM
    • Posts 508
    You may be able to use ROWNUM, depending on your query.

    select * from table_name where rownum < 11

    Check the oracle docs and this thread.
Page 1 of 1 (3 items)