how to retrive only second row from table?

Answer Posted / kishore.p

select top 1 * from tblemp b where b.empsal not in(select
top n-1 empsal from tblemp e)

note:- here the n will be the number of only row you would
like to display.

here in the above case n=2 i.e., n-1=1

so this will be the querry:

select top 1 * from tblemp b where b.empsal not in(select
top 1 empsal from tblemp e)

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 different types of tables in sql?

700


how to increment dates by 1 in mysql? : Sql dba

727


Does sql profiler affect performance?

733


What are sql queries used for?

762


What are its different types of dbms?

715






What is the most restrictive isolation level? : Transact sql

768


how many ways to get the current time? : Sql dba

710


How much does sql cost?

735


What is a temporal table?

666


How to make a copy values from one column to another in sql?

769


Does sql backup shrink transaction log?

735


What is parameter substitution in sql?

755


What is difference sql and mysql?

704


What is difference between sql and mysql?

750


What is sql analyzer?

759