Is there a 'START AT' equivalent in MS-SQL?

后端 未结 4 603
说谎
说谎 2021-02-08 06:45

Some databases support commands such as:

SELECT TOP 10 START AT 10 * FROM 

Essentially I need to pull the first 10 records, then t

4条回答
  •  天命终不由人
    2021-02-08 06:51

    Which version of SQL Server?

    In SQL Server 2000 this is a real pain (though possible using ugly tricks like that posted by stingyjack).

    In 2005 and later it's a little easier- look at the Row_Number() function.

    And, depending on your client application it may not even be that hard. Some of the ASP.Net grid controls have support for automatic paging.

提交回复
热议问题