how to find the second highest salary from emp table?

Answer Posted / r.arjunarao

select a.sal from emp a where 2=(select count(distinct(b.sal)) from emp b where b.sal>=a.sal)

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many aggregate functions are available there in sql?

529


How long will it take to learn pl sql?

526


What are aggregate and scalar functions?

527


What is procedure function?

541


Can we rollback after truncate?

566






What is nosql vs sql?

570


what is meant by urlencode and urldocode? : Sql dba

603


What is a crud api?

502


What are sql data types?

550


Can we have two clustered index on a table?

568


How do you delete duplicates in sql query using rowid?

543


What is dml with example?

519


What is cursor in pl sql with examples?

482


What are the methods of filing?

524


what is the difference between delete and truncate commands? : Sql dba

539