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 are the different normalization forms?
When would you prefer to have a minimum number of indexes?
Explain “not null constraint” in sql server?
What are the rendering extensions of ssrs?
how would you write a sql query to compute a frequency table of a certain attribute involving two joins? What changes would you need to make if you want to order by or group by some attribute? What would you do to account for nulls?
where can you add custom error messages to sql server? : Sql server administration
How to generate create view script on an existing view?
What are the restraints imposed on the table design by a merge replication?
What are the advantages of user-defined functions over stored procedures in sql server?
Can a table be created inside a trigger?
Can select statements be used on views in ms sql server?
What are the advantages of using a stored procedure?
What is the purpose of data source?
What is use of attribute hierarchy ordered ? : sql server analysis services, ssas
How to create user messages with print statements in ms sql server?