how to retrive only second row from table?

Answer Posted / nilesh

hi all,

This will also work fine, try it

select top 1 * from (select top 2 * from table_name)as set
order by set.col_name desc

here table_name is the name of the table from which
you want to retrive the record.
And col_name is the column name by which you are sorting
the records

If it found wrong plz correct it....
and show it on this site

Is This Answer Correct ?    2 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what are rollup and cube in t-sql? : Transact sql

819


What is pls integer?

779


How are sql commands classified?

803


Is drop table faster than truncate?

740


How many developers work on postgresql?

735






What is pl sql quora?

823


what are aggregate and scalar functions? : Sql dba

736


what are the different index configurations a table can have? : Sql dba

750


What are the benefits of triggers?

896


What are local and global variables and their differences?

810


What is the difference between a primary key and a unique key?

750


What is the difference between jpql and sql?

784


what are the different type of sql's statements ? : Sql dba

701


How do you identify a primary key?

813


What is difference between stored procedures and application procedures?

764