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
 General SQL Server Forums
 New to SQL Server Programming
 how to get 10 to 60 row value

Author  Topic 

sqllover
Constraint Violating Yak Guru

338 Posts

Posted - 2007-01-30 : 02:52:50
hi, i have 100 records in my table,how to the record from 10 row to 50 row ,can any one give me query for this

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-01-30 : 02:56:30
select top 41 * from (select top 50 * from mytable order by somecol) order by somecol desc


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-01-30 : 02:56:53
How do you define 10th and 50th record in the table?

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

sqllover
Constraint Violating Yak Guru

338 Posts

Posted - 2007-01-30 : 03:02:07
hi harsh_athalye i mean top 10 th record upto 50 th record.

hi peso thanks,harsh_athalye for ur help
Go to Top of Page
   

- Advertisement -