Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2003
    Posts
    4

    Unanswered: Limited SQL "select"

    Hi,

    I have a very large table and I want to "select * from table_name", but I want to display only the first 10 rows.

    MySQL has LIMIT clause to do this. What about Oracle's SQL*PLUS 8?

    Thanx

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Code:
    select * 
      from ( select foo
                  , bar
               from yourtable 
             order 
                 by foo desc )
     where rownum <= 10
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Aug 2003
    Posts
    4
    Very many thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •