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
Is it possible to read/write files to-and-from PL/SQL?
Which one is better sql or oracle?
what are all types of user defined functions? : Sql dba
How do you copy a table in sql?
What is multiple partition?
How much ram can sql express use?
Does sql view stored data?
Can you sum a count in sql?
How you improve the performance of sql*loader? : aql loader
Is sql procedural language?
Can pl sql procedure have a return statement?
What is the difference between having clause and where clause?
what is cursor and its type, what is ref cursor write a syntax to pass ref cursor into procedure out fucntion and call the procedure
What is sql basics?
what is the functionality of the function htmlentities? : Sql dba