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

Is it mandatory for the primary key to be given a value when a new record is inserted?

802


How do I copy a table in sql?

597


Can a key be both primary and foreign?

606


What are aggregate functions in sql?

744


how to get a list of columns in an existing table? : Sql dba

633






Why trigger is used in sql?

616


What language is oracle sql developer?

618


Can we rollback after truncate?

660


Does sql between include endpoints?

650


Is it possible to create startup or shutdown trigger for on-schema?

675


How much does sql certification cost?

638


how does a local variable is defined using t-sql? : Transact sql

640


Why partition by is used in sql?

636


Differentiate between % rowtype and type record.

837


What are the triggers associated with image items?

718