Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Does MSSQL have an equivelant or a work-around to MySQL's LIMIT clause?

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-02-09 : 13:50:00
Chris Ellenburg writes "Is there and equivelent of MySQL's LIMIT clause for a SELECT in MSSQL? For example if I only want the first 20 records that match my query, I would say:

SELECT * FROM TABLE WHERE THIS = "THAT" ORDER BY FName LIMIT 0,20


Then if I want the next 20 I would say:

SELECT * FROM TABLE WHERE THIS = "THAT" ORDER BY FName LIMIT 21,20



I have read a good amount of material but I can't seem to find anything.

Chris Ellenburg
Webmaster
WFMY News 2"
   

- Advertisement -