adspace
How to find 3rd highest salary of an employee from the employee table in sql?
Answer Posted / Mohammad Badizzamaan
To find the third highest salary, you can use a subquery with the DISTINCT keyword and ORDER BY clause along with LIMIT and OFFSET clauses. Here is an example SQL query:n`nSELECT salaries FROM ( SELECT DISTINCT salaries FROM employee ORDER BY salaries DESC LIMIT 3 OFFSET 1 ) as temp;nThis will return the third highest salary from the employee table.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Hi am new to PLSQL & facing problems in writing code like in SP, Functions, so any one having some SP coding with in depth explanation please share with me my Email ID suvarnaatsuvarna@rediffmail.com Or taking tanning on this please do contact me
If a cursor is open, how can we find in a pl/sql block?
How do I remove duplicates in two columns?
What is the best sql course?
how to use regular expression in pattern match conditions? : Sql dba
what is sql server agent? : Sql dba
define sql insert statement ? : Sql dba
how to start mysql server? : Sql dba
Can we rollback truncate?
What is the current version of sql?
Is primary key always clustered index?
What is your daily office routine?
Do we need to rebuild index after truncate?
what is collation? : Sql dba
what is bcp? When does it used? : Sql dba