Limit Number Of Rows Returned In MS SQL
Tue, 09/23/2008 - 08:34 | by philipnorton42
To limit the number of rows returned in a MS SQL query you need to use the TOP command. This goes before you name the columns that are to be returned by the SELECT statement.
The following query returns the first 35 rows from a table.
SELECT TOP 35 * FROM table WHERE value > 4 ORDER BY id DESC
Comments
Post new comment