how to calcuate the second highest salary of he employee
Answer Posted / ramya p
SELECT DISTINCT (sal),deptno FROM emp a
WHERE &N = (SELECT COUNT (DISTINCT (b.sal)) FROM emp b
WHERE a.sal<=b.sal)
N is the Nth highest salary you want to print. In this case
N=2
| Is This Answer Correct ? | 7 Yes | 1 No |
Post New Answer View All Answers
How many databases can sql express handle?
Which is faster joins or subqueries?
Is sql procedural language?
How many sectors are in a partition?
What is the difference between view and stored procedure?
What are operators available in sql?
What is the use of prepared statement?
Define the select into statement.
What is online transaction processing (oltp)?
Can we update views in sql?
Is it possible to update views?
Explain the the delete statements in sql?
What is join view in sql?
How do you declare a user-defined exception?
What are sql procedures?