Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Selecting the Nth record in a table

Author  Topic 

link2tdss
Starting Member

1 Post

Posted - 2004-05-22 : 07:44:44
Hello

I have a problem for which i require a single querry,plzz try to help.

In postgres or My SQl there are commands caled as limit and offset

Eg

Select cust_no from customer limit 2 offset 5

this will return the 6th and 7th row from the cutomer table

i need to know if there is anything simmilar which i can use in SQL server

plzz any idea that comes to u r mind is welcome

thanks

harshal_in
Aged Yak Warrior

633 Posts

Posted - 2004-05-22 : 08:29:14
to get the 10th record:
select top 1 * from (select top 10 * from table_name) a order by column_Name desc

He is a fool for five minutes who asks , but who does not ask remains a fool for life!

http://www.sqldude.4t.com
Go to Top of Page
   

- Advertisement -