Wednesday, June 6, 2012

SQL Server - Restrict number of rows retuned by SQL Server

Command to restrict number of rows returned by SQL Server

SET ROWCOUNT 100

Run above mentioned command in your SQL Query Analyzer, after which any SELECT
command executed will only return 100 rows

To reset the ROWCOUNT use below command

SET ROWCOUNT 0

Above command will make SQL Server to return all rows

No comments:

Post a Comment