Archive for March 28th, 2010

MySQL “LIMIT” Equivalent in SQL Server 2005

First of all, there is no direct replacement of MySQL “LIMIT” in SQL Server. Let’s have a look at syntax for “LIMIT” in MySQL Server.

SELECT *
FROM [TABLE NAME]
ORDER BY [ORDER BY COLUMN NAME]
LIMIT 10 OFFSET 100

This query will select 101 to 110 th rows of data in MySQL. In SQL Server “TOP” can be used to select fixed number of rows from a Table or View.
Continue reading