how to find out second largest value in the table

Answer Posted / karthik

select distinct sal from emp a where 2 = (select count
(distinct sal) from emp b where a.sal <= b.sal)

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you assign multiple query result rows to a variable?

632


Which dictionary tables and/or views would you look at to diagnose a locking issue?

1564


What are oracle functions?

657


i wrote a pl/sql procedure. it must run every sunday 4.40 How can i schedule it with the help of dbms_jobs (or another other procedure with out creating bat file,exe file)

1882


What is tns name?

631






What do you mean by merge in oracle and how can you merge two tables?

601


how to do daily transactions with out sql* loader control file regesterd in apps?

1307


how can we store any pdf file in oracle

1732


What are the execution control statements in oracle?

689


What is a dynamic performance view in oracle?

691


Explain the use of owner option in exp command.

651


How do I start tns listener?

641


what is dynamic SGA and static SGA

3943


How to create an oracle testing table?

684


How are extents allocated to a segment?

665