find out first highest salary?

Answer Posted / surya

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

For example:-
If you enter n=1,it will display first highest salary
if you enter n=2,it will display second highest salary
......

if you enter n=nth,it will display nth salary

Is This Answer Correct ?    9 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is object data modeling?

693


What is data block in Oracle?

834


How to turn on or off recycle bin for the instance?

817


Please explain me all types of Data models. Also give me the details if each model can have other name.for example:schematic data model is also known as conceptual data model and entity relation data model.

2060


1) WIll all the user get the DEFAULT profile, if their current profile got deleted at any point of time? 2) What are the Situation we need to MOVE the TABLE between T.spaces? 3) What is the use of MOVING the TABLE between SCHEMA'S? 4) What are the Table Clause, Segment Clause and the Datafile Clause which will override each other? 5) Explain SORT_AREA_SIZE of Tempfile to make UNIFORM SIZE

1763


Explain an extent?

843


What operating systems are supported by oracle database 10g xe?

790


What is varray?

777


How to load excel data sheet to oracle database

756


What is oracle open database communication (odbc)?

747


Tab A A B ------ 1 A 2 B 3 C Tab B A B ----- 4 D 5 E 6 F Generate the value into B table from A table. Only table A has the value. Write the SQL query to get B table value.

1475


How to connect to the server with user account: sys?

766


When do you get a .pll extension in oracle? Explain its importance

770


What is using clause and give example?

800


How to create a server parameter file?

793