Showing posts with label any1. Show all posts
Showing posts with label any1. Show all posts

Thursday, March 8, 2012

Can i use Top keyword in SQL Server 2003?

Top keyword does not work in SQL server 2003. It works perfectly with SQL server 2005. Can any1 tell me how to extract top 10 rows in 2003 server. I guess rowcount also doesnt work with SQL server .Hai Vaishali!

In this case you can add an id field which acts like a row number. Then you can use the following query

select * from mytable where id between 1 and 10

It will return top 10 rows
Hope this will work

All the Best

With Regards
Vijay. R|||SQL server 2003 ?