Write a query to find second highest salary of an employee.
Answer Posted / deepshikha
SELECT MAX (sal)
FROM emp a,
(SELECT MAX (sal) max_sal
FROM emp) abc
WHERE a.sal < abc.max_sal
ORDER BY sal DESC;
| Is This Answer Correct ? | 0 Yes | 3 No |
Post New Answer View All Answers
Define the select into statement.
how to dump a table to a file with 'mysqldump'? : Sql dba
Mention what is the function that is used to transfer a pl/sql table log to a database table?
Does execute immediate commit?
What are all the different types of indexes?
Can a select statement fire a trigger?
Which table is left in join?
What is sql rowcount?
What are three advantages to using sql?
Why are cursors used?
What sql does db2 use?
Can we want to pass a parameter payroll_id to this external pl/sql function, how do we do it?
Are null values same as that of zero or a blank space?
Can you have more than one trigger on a table?
How would you reference column values before and after you have inserted and deleted triggers?