How can I restrict the number of rows returned to my query in SQL Server?

Neil Pike

March 4, 1999

1 Min Read
ITPro Today logo

A. With SQL 6.5 and below use the "set rowcount "option.

This option is still available with SQL 7.0, but this supports the TOP()function as well which will optimise better so use this instead. "selectTOP(n) from .........."

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like