How to find top three highest salary in emp table in oracle

0 votes
How to find top three highest salary in emp table in oracle?
Sep 17 in Database by Kithuzzz
• 20,660 points
220 views

1 answer to this question.

0 votes

Use this:

SELECT  *FROM 
    (
    SELECT *FROM emp 
    ORDER BY Salary desc
    )
WHERE rownum <= 3
ORDER BY Salary ;

I hope this helps you.

answered Sep 18 by narikkadan
• 37,660 points

Related Questions In Database

0 votes
0 answers
0 votes
1 answer

Which SQL query is used to find Nth highest salary from a salary table

If you want to find nth Salary ...READ MORE

answered Feb 14 in Database by Vaani
• 7,020 points
679 views
0 votes
1 answer

SQL query to find third highest salary in company

The easiest way to work this out ...READ MORE

answered Feb 21 in Database by Neha
• 8,940 points
9,244 views
0 votes
0 answers

How to find sum of multiple columns in a table in SQL Server 2005?

I have a table Emp which has these rows: Emp_cd ...READ MORE

Aug 19 in Database by Kithuzzz
• 20,660 points
487 views
0 votes
1 answer

How to insert date values into table?

You have to convert the literal to ...READ MORE

answered Feb 18 in Database by Vaani
• 7,020 points
450 views
0 votes
1 answer

CASE .. WHEN expression in Oracle SQL

Use an IN clause. Example: SELECT status, CASE ...READ MORE

answered Sep 17 in Database by narikkadan
• 37,660 points
61 views
0 votes
1 answer

Automating Oracle script with nolio

Depending upon the details of your script ...READ MORE

answered Jul 17, 2018 in Other DevOps Questions by ajs3033
• 7,280 points
378 views
0 votes
1 answer

Is there any boolean type in Oracle database?

Nope. I don't think there is one But ...READ MORE

answered Oct 10, 2018 in Database by Neha
• 6,300 points
364 views
0 votes
1 answer

How to find third or nᵗʰ maximum salary from salary table?

Use ROW_NUMBER(if you want a single) or DENSE_RANK(for all ...READ MORE

answered Sep 19 in Database by narikkadan
• 37,660 points
66 views
0 votes
1 answer

How to display databases in Oracle 11g using SQL*Plus

A MySQL "database" can be compared to ...READ MORE

answered Sep 12 in Database by narikkadan
• 37,660 points
264 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP