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
Explain commit, rollback and savepoint.
What is multiple columns?
Explain how can you save or place your msg in a table?
what is a database? : Sql dba
Why we use triggers in mysql?
Is sql procedural language?
How is debugging done?
how to install mysql? : Sql dba
how to rename an existing table in mysql? : Sql dba
The in operator may be used if you know the exact value you want to return for at least one of the columns.
What is trigger with example?
What are the parts of a sql statement?
What is crud sql?
What are the operators used in select statements?
how to create a new table by selecting rows from another table in mysql? : Sql dba