how to find the second highest salary from emp table?

Answer Posted / rakesh a.

select Amount from PurchaseOrderDetail pod where
1=(select COUNT(amount) from PurchaseOrderDetail pod2 where pod2.Amount>pod.Amount)

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between microsoft access and sql server?

533


how to get a list of all tables in a database? : Sql dba

513


Why do we use sqlite?

536


How many joins can you have in sql?

524


What is the difference between inner join and left join?

550






How do you create a unique index?

575


What is t sql used for?

553


what is the syntax used for partition in tsql? : Transact sql

542


Is it possible to remove child records without removing master table records...the two having pk,fk relationship?

809


How many sql statements are used? Define them.

576


How do I save a stored procedure?

527


what is log shipping? : Sql dba

615


What is pl sql and why it is used for?

574


How would you convert date into julian date format?

594


Can you upgrade sql express to full sql?

520