Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2002
    Posts
    1

    Lightbulb Unanswered: limiting the range of select result

    Hi,

    i'm searching how to tell to mysql server to limit
    the range of a result select.
    I would like to have the equivalent of the LIMIT clause in MYSQL.

    I know there is TOP but it is not sufficient because it returns
    only the first n lines.
    I would like to tell sqlserver to begin at a certain offset.

    Any idea ?

    Thx

  2. #2
    Join Date
    Oct 2001
    Location
    England
    Posts
    426
    you can use a derived table

    select top 10 *
    from (select top 20 * from tbl order by id) as a
    order by id desc


    Will get the second 10 recs.

Posting Permissions

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