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


Please Help Members By Posting Answers For Below Questions

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

2091


If a cursor is open, how can we find in a pl/sql block?

1238


How do I remove duplicates in two columns?

1187


What is the best sql course?

1050


how to use regular expression in pattern match conditions? : Sql dba

1113


what is sql server agent? : Sql dba

1182


define sql insert statement ? : Sql dba

1098


how to start mysql server? : Sql dba

1267


Can we rollback truncate?

1074


What is the current version of sql?

1094


Is primary key always clustered index?

1095


What is your daily office routine?

2346


Do we need to rebuild index after truncate?

1138


what is collation? : Sql dba

1229


what is bcp? When does it used? : Sql dba

1056