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
how can we take a backup of a mysql table and how can we restore it. ? : Sql dba
Why do we go for stored procedures?
what are all the common sql function? : Sql dba
what are the 'mysql' command line options? : Sql dba
What are the two parts of design view?
Can we debug stored procedure?
What is the default isolation level in sql server? : Transact sql
what are the differences between get and post methods in form submitting. Give the case where we can use get and we can use post methods? : Sql dba
What is scalar function?
How to return an array from java to pl/sql?
Can a commit statement be executed as part of a trigger?
Can we rollback after truncate?
What is the size of partition table?
What is sql*loader and what is it used for?
Describe sql comments?