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

Answer Posted / x.cannon

SELECT * FROM
(
SELECT NTILE(2) AS div, * FROM
(
SELECT TOP(20) FROM <table_name>
) AS tmp
) AS tmp WHERE div = 2

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the different types of backups that exist?

844


What is a primary index?

691


How would you add a section to a table?

771


Explain what is raid and what are different types of raid levels?

703


What is @@error in sql?

792






Define tempdb database?

751


Can we call future method from trigger?

678


Difference between aggregate functions of sql?

827


What is the server name for sql management studio?

651


What is the difference between TRUNCATE and DROP?

804


If you lose rights to your sql server instance what are the options to connect to sql server instance? : sql server security

709


Can you insert NULL in unique column?

823


What is the difference between deallocate cursor and close cursor?

908


What are the Advantages of using CTE in sql server?

753


How do you maintain database integrity where deletions from one table will automatically cause deletions in another table?

924