find out the second highest salary?

Answer Posted / subash

select sal from emp e
where 2=(select count(distinct sal) from emp b where
b.sal>e.sal)

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the use of control file?

655


What are the logical operations?

677


Explain what are synonyms used for?

608


How we can able to import our own template (users designed MS-Word templates) which has many tabular columns; need to pass some values generate by Oracle-reports9i? Actually need to import more than 400 MS-Word templates into Oracle Reports-9i to minimize layout design in Reports.

1612


How many objectname will be created for a single table drop function? Why 'flashback' query giving error "ORA-38312: original name is used by an existing object" while getting the table?

1805






types of indexes and the rationale behind choosing a particular index for a situation.

1984


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

601


How to generate query output in html format?

565


Where do we use decode and case statements?

560


Describe an oracle table?

571


When system tablespace is created?

605


How to delete a column in an existing table?

593


What is query image?

584


Hi Masters, in Oracle Applications 11i, we hace 2 functions using the same form, i need to create 1 personalization, but that code must afect only one function.... how can i do that?

1771


How to end the current transaction in oracle?

556