Navigation
|
|
|
| |
Snippet Library
|
|
|
| |
Blog Archive
|
|
|
| |
Random Affiliates
|
|
|
|

|
Snippet Library |
|
SQL - Structured Query Language (.sql) |

|

|
| SET ROWCOUNT |

|
| |
You're probably familiar with the typical "SELECT * FROM Table" SQL statement, which returns all the records in a table. By adding a WHERE clause to a SELECT statement, you limit the resultset to only those records that match the WHERE criteria. Although this may or may not limit the resultset, the number of records returned to the client is always unknown. To specify the number of records that are returned by a query, you can use either SET ROWCOUNT or the TOP keyword.
A SET ROWCOUNT statement simply limits the number of records returned to the client during a single connection. As soon as the number of rows specified is found, SQL Server stops processing the query. The syntax looks like this:
http://gethelp.devx.com/techtips/thesqlpro/10min/10min0600.asp |
|
| |
| |
|
| |
| Go Back |
|

|
Advertisements
|

|