A. With SQL 6.5 and below use the "set rowcount <n>" option.
e.g. SET ROWCOUNT 10
SELECT * FROM <tbl>
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. Note that the database concerned MUST be in SQL 7.0 compatibility mode - run sp_dbcmptlevel <dbname> to check whether it is or not.
e.g. select TOP(10) from <tbl>
2 comments
Hide comments