how to find the second highest salary from emp table?

Answer Posted / rajkishore bagwan

simplest method ----
select salary
from employees
order by salary desc
offset n-1 rows fetch next 1 rows only
(replace n with any number it will give you the nth highest salary)

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what are all different types of collation sensitivity? : Sql dba

523


Is it possible to create the following trigger: before or after update trigger for each row?

718


Can I join the same table twice?

522


Why stored procedures are faster than query?

566


what is meant by nl2br()? : Sql dba

564






mention if it is possible to import data directly from t-sql commands without using sql server integration services? If yes, what are the commands? : Transact sql

559


how to start mysql server? : Sql dba

609


How to read/write files from pl/sql?

578


What is difference between primary and secondary key?

515


What is compiled query?

516


What is rtm in testing?

570


Is ms sql is free?

526


What is nosql example?

581


How do I start pl sql?

490


who introduced sql?

566