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

What is a nvl function?

642


what is the scenario where you take the database to NoArchivelog mode?

1945


What is the difference between hot backup and cold backup in oracle? Tell about their benefits also.

635


how can we store any pdf file in oracle

1732


What is oracle data type?

652






What types of joins are used in writing subqueries?

641


How many categories of data types in oracle?

676


What is data file?

701


How to connect to a remote server?

645


Explain user account with reference to oracle.

621


What are ddl statements in oracle?

671


Calculate difference between 2 date / times in oracle sql?

653


How to join two tables in a single query using oracle?

651


does the query needs a hint to access a materialized view?

1541


What are the roles of dba?

704