How to select nth record from a table?

Answer Posted / andy

select a.id,a.name from dept a
where
1= (select COUNT(b.id) from dept b where b.id>a.id)

Is This Answer Correct ?    4 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you create an execution plan?

493


What is a trigger in sql server?

534


what are the types of indexes? : Sql server database administration

596


How optimize sql query with multiple joins in sql server?

417


Why functions are used in sql server?

504






what is the difference between Tabular and Matrix report?

124


last function used in MS Access to convert sql what function will use in sql

1606


What is the difference between cartesian product and cross join?

482


What is set nocount on?

504


Explain Reporting Life Cycle?

90


How to list all field names in the result set using mssql_field_name()?

527


How do I delete a sql server database?

549


What is table value parameters (tvp)?

546


List some case manipulation functions in sql?

599


What is the cartesian product of the table?

552