How to select nth record from a table?

Answer Posted / pallavi attarde

Here N is for Nth record.

SELECT TOP 1 * FROM
(SELECT TOP N * FROM
(SELECT Table.Coloumn1,Table.Coloumn2 from Table)
as d order by d.Coloumn1 desc) as p order by Coloumn1

Is This Answer Correct ?    8 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is a check constraint?

626


In what sequence sql statement is processed?

577


What are orphan records?

543


Which event (check constraints, foreign key, rule, trigger, primary key check) will be performed last for an integrity check?

507


Which are the new data types introduced in sql server 2008?

503






What is built-in function?

541


How do you Implement SSIS Packages in your Project?

1508


Why variables called the most powerful component of ssis?

587


What is a result set object returned by mssql_query()?

568


What different steps will a sql server developer take to secure sql server?

493


Can a cursor be updated? If yes, how you can protect which columns are updated?

508


What is the current pricing model of SQL Azure?

88


How to create a local temporary stored procedure?

493


What is the ‘fillfactor’?

560


Explain the third normal form(3nf)?

518