find out the second highest salary?

Answer Posted / v.karthikeyan

select * from emp
where &n-1=(select count(distinct(sal)) from emp b
where emp.sal<b.sal)

Is This Answer Correct ?    62 Yes 30 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

while i take backup using ibm tsm the following errors occurred: rman-03009 ora-19513 ora-27206 ora-19502 ora-27030 ora-ora19511

3877


What is oracle used for?

539


How to retrieve data from an cursor to a record?

564


What is a cursor and what are the steps need to be taken?

603


Which is faster join or subquery in oracle?

540






How to load data through external tables?

587


How can we delete duplicate rows in a table?

568


Compare and contrast between sql and sql server and explain its various functions?

542


What are the uses of Database Trigger ?

1111


What is the difference between translate and replace?

567


what is the need of indexing topic in oracle? where do we use in a Java project? any other option other than using this to get the same result where we use indexing ?

2052


What are the different types of synonyms?

605


What is the difference between substr and instr?

527


What are the different types of record groups in oracle? Explain each of them

608


Explain the difference between sap and oracle?

579