What is the SQL query to get the third highest salary of an employee from employee_table

0 votes
Hi!!

Can someone tell me how to write a SQL query to get the third highest salary of an employee from employee_table?
Sep 26, 2018 in Database by DataKing99
• 8,100 points
44 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

You can try out something like this:

SELECT TOP 1 salary

FROM(

SELECT TOP 3 salary

FROM employee_table

ORDER BY salary DESC) AS emp

ORDER BY salary ASC;
answered Sep 26, 2018 by darklord
• 6,140 points

Related Questions In Database

0 votes
1 answer

What is the best way to fetch data from table?

Hey Shraddha, I understand your doubts about fetching ...READ MORE

answered May 24 in Database by Sampriti
• 620 points
14 views
0 votes
1 answer

What is the need of MERGE statement?

This statement allows conditional update or insertion of ...READ MORE

answered Oct 23, 2018 in Database by DataKing99
• 8,100 points
13 views
0 votes
1 answer

What are the advantages of SQL?

Simple SQL queries can be used to ...READ MORE

answered Nov 8, 2018 in Database by DataKing99
• 8,100 points
90 views
0 votes
1 answer

What is the syntax of USE statement in MySQL?

The USE statement is used to mention ...READ MORE

answered Nov 27, 2018 in Database by darklord
• 6,140 points
57 views
0 votes
1 answer

How to connect Java program to the MySQL database?

You can connect your Java code with ...READ MORE

answered May 11, 2018 in Java by parth295
• 4,600 points
99 views
0 votes
1 answer

Is SELECT * harmful in Database?

There are really three major reasons: Inefficiency in ...READ MORE

answered Sep 7, 2018 in Database by DataKing99
• 8,100 points
21 views
0 votes
1 answer

Difference between single and double quotes in SQL

Single quotes are used to indicate the ...READ MORE

answered Sep 11, 2018 in Database by CodingByHeart77
• 3,680 points
52 views
0 votes
1 answer

Can different databases use different name quotes?

This use of quotes is called delimited ...READ MORE

answered Sep 11, 2018 in Database by CodingByHeart77
• 3,680 points
25 views
0 votes
1 answer

What are the ways to get the count of records in a table

To count the number of records in ...READ MORE

answered Sep 26, 2018 in Database by darklord
• 6,140 points
39 views
0 votes
1 answer

Write a SQL query to find the names of employees that begin with ‘S’

To display the name of the employees ...READ MORE

answered Sep 26, 2018 in Database by darklord
• 6,140 points
30 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.