how to get second highest salary in SQL(as/4000

Answer Posted / devi

select sal from (select sal,rank() over(order by sal desc)
as rank from emp) where rank>1 and rank<3

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to run pl sql program in mysql?

512


what is the difference between truncate and delete statement? : Transact sql

551


Explain the methods used to protect source code of pl/sql.

546


Does a user_objects view have an entry for a trigger?

570


What action do you have to perform before retrieving data from the next result set of a stored procedure ?

2097






What is set serveroutput on in pl sql?

567


What is an emotional trigger?

518


How many databases can sql express handle?

536


What is cursor and why it is required?

558


What does over partition by mean in sql?

533


what are all the common sql function? : Sql dba

587


What are tables in sql?

550


How exception is different from error?

545


Explain 3 basic parts of a trigger.

843


How do I write a cron which will run a sql query and mail the results to agroup?

527