how to find the second highest salary from emp table?
Answer Posted / naveed saleh
You can use this for getting nth highest salary from
Employee table as follows
SELECT TOP 1 salary
FROM (
SELECT DISTINCT TOP n salary
FROM employee
ORDER BY salary DESC) a
ORDER BY salary
where n > 1 (n is always greater than one)
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Can we use ddl commands in pl sql?
What are two statement types in sql?
how many columns can be used for creating index? : Sql dba
How to install oracle sql developer?
How to add, remove, modify users using sql?
Can a foreign key be a duplicate?
What are the types of records?
Explain the advantages and disadvantages of stored procedure?
What are different types of triggers?
How to use distinct and count in sql query? Explain
What are the different types of database management systems?
What is hibernate and its relation to sql?
what is schema? : Sql dba
What are database links used for?
Mention what is the use of function "module procedure" in pl/sql?