how to find the second highest salary from emp table?
Answer Posted / hemant
select salary,empname from employee where
salary=(select max(salary) from employee where
salary<(select max(salary) from employee))
This query will produce all the result whose salary is
second highest.
1. A 20000
2. B 20000
3. C 20000
4. D 20000
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is the requirement of self-join?
How many types of tables are there?
What is the difference between pl and sql?
What is on delete restrict?
Which is faster union or join?
What is the least restrictive isolation level? : Transact sql
How to read/write files from pl/sql?
What can I use instead of union in sql?
how can we find the number of rows in a table using mysql? : Sql dba
How do I upgrade sql?
What is sql and db2?
What normalization means?
Is time a data type in sql?
What are types of exception?
What is primary key in db?