Write a query to find second highest salary of an employee.

Answer Posted / kitcat

SELECT salary
FROM (SELECT salary FROM emp
ORDER BY DESC salary)
WHERE RowNum=2

Is This Answer Correct ?    1 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you optimize a stored procedure query?

570


Can we want to pass a parameter payroll_id to this external pl/sql function, how do we do it?

565


What is out parameter used for eventhough return statement can also be used in pl/sql?

588


What is ttitle and btitle?

579


Can variables be used in sql statements?

555






Why we use cross join?

543


what are integrity rules?

572


How to avoid using cursors? What to use instead of cursor and in what cases to do so?

610


Can we insert in sql function?

551


How do you delete a table?

540


what does the t-sql command ident_current does? : Transact sql

546


What is java sql driver?

550


What do you mean by field in sql?

538


Can a table have no primary key?

561


What are different types of triggers?

565