Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to retrieve range of 10th rows to 20 th rows from total
rows from a database table.? (Not from Dataset)

Answer Posted / upendra

USE CTE

http://www.4guysfromrolla.com/webtech/071906-1.shtml


WITH CTE_Table AS ( SELECT
Row_number() OVER (
ORDER BY
sort_Column ) AS RowNum
, premiumamount
FROM
shplaninfo )

SELECT
*
FROM
CTE_Table
WHERE
RowNum BETWEEN ( 10 ) AND ( 19 )

Is This Answer Correct ?    5 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is row_number()?

984


Why we use the openxml clause?

1011


What are built in functions?

1016


How to find tables without indexes?

1090


Can you explain different types of locks in sql server?

947


What do we have to check in database testing?

1019


What is the concept of optimization?

1060


What is the purpose of the tempdb database?

1000


How do I schedule a sql server profiler trace?

977


Can you force a query to use a specific index?

945


What is an execution plan? How would you view the execution plan?

1078


How you can get a list of all the table constraints in a database? : Sql server administration

1029


Explain throw statement in sql server 2008?

994


What are the system database in sql server 2005?

1044


What is it unwise to create wide clustered index keys?

1007