Set Top N Rows in SQL Serevr Select Query other than TOP

Lakhangarg
Posted by Lakhangarg under Sql Server category on | Views : 3442
One Method to Select Top N rows is :
Suppose N=5
SELECT TOP 5 * FROM Table1


and the second method to do the same is:

SET ROWCOUNT 5;
SELECT * FROM Table1;


Thanks
Lakhan Pal Garg

Comments or Responses

Login to post response