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

    Unanswered: Like LIMIT for MySql but for MSSQL

    Hi everyone,

    I am looking for a function in MSSQL that performs similar to the LIMIT function in MySQL. Here is the LIMIT function's definition:

    The LIMIT clause can be used to constrain the number of rows returned by the SELECT statement. LIMIT takes one or two numeric arguments, which must be integer constants.

    With two arguments, the first argument specifies the offset of the first row to return, and the second specifies the maximum number of rows to return. The offset of the initial row is 0 (not 1):

    mysql> SELECT * FROM table LIMIT 5,10; # Retrieve rows 6-15
    I am aware of TOP and SET ROWCOUNT functions in MSSQL but neither provide the Offset functionality.

    Any help would be appreciated,


  2. #2
    Join Date
    Nov 2002
    Nope...perhaps in SQL Server 2005...

    This is the Best I've found. Say Hi to Jeff for me

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

Posting Permissions

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