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 can we find duplicate records in a table?

512


what is a database lock ? : Sql dba

589


What is int identity in sql?

572


What will you get by the cursor attribute sql%notfound?

590


How can I delete duplicate rows?

560






Why plvtab is considered as the easiest way to access the pl/sql table?

617


Difference between truncate, delete and drop commands?

557


What is normalization? How many normalization forms are there?

552


What is pl sql package?

591


What are the advantages of pl sql?

603


what does it mean to have quoted_identifier on? What are the implications of having it off? : Sql dba

525


What are its different types of dbms?

536


what are the difference between clustered and a non-clustered index? : Sql dba

525


Why is a primary key important?

545


how to drop an existing index in mysql? : Sql dba

535