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
 Transact-SQL (2000)
 How to select rows from 10th to the 20th

Author  Topic 

enb141
Starting Member

14 Posts

Posted - 2004-08-31 : 12:57:13
I need a select that returns me the 10th and 20th row,

For example

Select Top 10 IdClient From T_CLIENTS


will return me the first 10 IdClients but what if I want from the Client 10 to 20?

Seventhnight
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2004-08-31 : 13:00:31
Search for paging around here.... many many examples

one way

Select top 10 IdClient From (Select top 20 IdClient from T_Clients Order By idClient) Order By idClient Desc

Corey
Go to Top of Page

enb141
Starting Member

14 Posts

Posted - 2004-08-31 : 19:36:26
Thanks :)
Go to Top of Page
   

- Advertisement -