how to find the second highest salary from emp table?
Answer Posted / gokul
In MySQL, this query will be easier to find 2nd highest
salary and to fetch all the fields from a table.
select * from emp where sal not in (select max(sal)
from emp) order by sal desc limit 1
| Is This Answer Correct ? | 1 Yes | 3 No |
Post New Answer View All Answers
What is update query?
what is an alias command? : Sql dba
How do I view stored procedures?
what are the advantages of sql ? : Sql dba
What is database sql?
What is left inner join in sql?
What are the usages of sql?
Explain the working of primary key?
What is cartesian join in sql?
Is a view faster than a stored procedure?
How to combine two stored procedures in sql?
how would you enter characters as hex numbers? : Sql dba
Can we use rowid as primary key?
how to shut down the server with 'mysqladmin'? : Sql dba
Can we insert in view in sql?