Jun 20, 2001 #1 mrdance Programmer Apr 17, 2001 308 SE In mysql you can specify the startposition of the result as the offset and limit as the number of rows to be returned. For example; SELECT * FROM TABLE LIMIT $offset, $limit How do I do it in MSSQL? Thanks / Henrik
In mysql you can specify the startposition of the result as the offset and limit as the number of rows to be returned. For example; SELECT * FROM TABLE LIMIT $offset, $limit How do I do it in MSSQL? Thanks / Henrik
Jun 20, 2001 #2 Bernadette MIS Nov 16, 2000 203 GB Hi There To limit the amount of records returned in mssql you can use the Top keyword. To Select the top 10 records from a table ----------------------------------------- Select Top 10 * From mytable To Select the top 10 Percent of records from a table ---------------------------------------------------- Select Top 10 PERCENT * From mytable I am not sure about the starting position . Hope this helps Bernadette Upvote 0 Downvote
Hi There To limit the amount of records returned in mssql you can use the Top keyword. To Select the top 10 records from a table ----------------------------------------- Select Top 10 * From mytable To Select the top 10 Percent of records from a table ---------------------------------------------------- Select Top 10 PERCENT * From mytable I am not sure about the starting position . Hope this helps Bernadette