how to find the second highest salary from emp table?
Answer Posted / arun
select distinct (a.salary) from employees a
where &N = (select count (distinct(b.salary))
from employees b where a.salary <= b.salary);
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is the difference between nvl function, ifnull function, and isnull function?
What is difference between procedure and trigger?
Can we join tables without foreign key?
What are the popular database management systems in the it industry?
How to select unique records from a table?
Explain the uses of a database trigger?
How to create a menu in sqlplus or pl/sql?
what are the security recommendations while using mysql? : Sql dba
What is synonyms?
What is lexical units in pl sql?
What is the difference between having clause and where clause?
What is dml with example?
Define overloaded procedure?
what is a constraint? : Sql dba
What is primary key and unique key?