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

in the physical file layout, where should the transaction log be stored in relation to the data file? : Sql server administration

553


Differentiate between SQL and ORACLE joins and write their syntax.

593


Explain what is dbcc?

595


How do you know if sql server is running on your local system?

542


What is the difference between push and pull subscription? : sql server replication

616






What is the purpose of floor function?

541


Which sql server table is used to hold the stored procedure scripts?

614


Which joins are sql server default?

511


What is the difference between migration and upgradation in sql server?

606


What is table constraint?

541


Can we run Reporting Services with SQL Server express edition, which is a free version of SQL Server?

78


Why use “nolock” in sql server?

561


Explain trigger and its types?

614


How do I debug a stored procedure in sql server?

539


What are the different Authentication modes in SQL Server and how can you change authentication mode?

642