Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2003
    Posts
    9

    Unanswered: SELECT TOP 100 from TABLE. Possible?

    Hi,

    In SQL server:
    SELECT TOP 100 from TABLE
    = Retrive the first 100 record

    My question: Is there a similar statement in mySQL?

    Thanks!

  2. #2
    Join Date
    Feb 2001
    Location
    NC, USA
    Posts
    200

    Re: SELECT TOP 100 from TABLE. Possible?

    Originally posted by forte
    Hi,

    In SQL server:
    SELECT TOP 100 from TABLE
    = Retrive the first 100 record

    My question: Is there a similar statement in mySQL?

    Thanks!
    Code:
    SELECT * FROM table_name LIMIT 100;

  3. #3
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    note that without an ORDER BY, all you get is some 100 records, not the first or top ones


  4. #4
    Join Date
    Apr 2003
    Posts
    9
    Thank u very much for the prompt reply!!

    SELECT * TABLE WHERE test='test_data' ORDER BY test_name LIMIT 5

Posting Permissions

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