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, 2022 in Database by Kithuzzz
• 38,000 points
9,121 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, 2022 by narikkadan
• 63,600 points

Related Questions In Database

0 votes
0 answers

How to fetch the nth highest salary from a table without using TOP and sub-query?

I was recently requested to create a ...READ MORE

Aug 25, 2022 in Database by Kithuzzz
• 38,000 points
1,380 views
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, 2022 in Database by Vaani
• 7,070 points
2,852 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, 2022 in Database by Neha
• 9,020 points
51,424 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, 2022 in Database by Kithuzzz
• 38,000 points
1,614 views
0 votes
1 answer

How to insert date values into table?

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

answered Feb 18, 2022 in Database by Vaani
• 7,070 points
3,174 views
0 votes
1 answer

CASE .. WHEN expression in Oracle SQL

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

answered Sep 17, 2022 in Database by narikkadan
• 63,600 points
603 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,300 points
1,042 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
982 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, 2022 in Database by narikkadan
• 63,600 points
1,095 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, 2022 in Database by narikkadan
• 63,600 points
3,285 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