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
What is row_number()?
Why we use the openxml clause?
What are built in functions?
How to find tables without indexes?
Can you explain different types of locks in sql server?
What do we have to check in database testing?
What is the concept of optimization?
What is the purpose of the tempdb database?
How do I schedule a sql server profiler trace?
Can you force a query to use a specific index?
What is an execution plan? How would you view the execution plan?
How you can get a list of all the table constraints in a database? : Sql server administration
Explain throw statement in sql server 2008?
What are the system database in sql server 2005?
What is it unwise to create wide clustered index keys?