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
how many tables will create when we create table, what are they? : Sql dba
Is vs as in pl sql?
What is trigger in sql? Explain
How can you fetch first 5 characters of the string?
What is the use of triggers?
How to read/write files from pl/sql?
If the application is running very slow? At what points you need to go about the database in order to improve the performance?
what are the different index configurations a table can have? : Sql dba
Is pl sql useful?
What do you understand by pl/sql records?
Is pl sql still used?
Explain what is dbms?
Can we write dml inside a function in sql server?
Is nosql faster than sql?
Define commit, rollback and savepoint?