how to calcuate the second highest salary of he employee
Answer Posted / hari krishna j
SELECT A.SAL FROM EMP_TAB A
WHERE 1=(SELECT COUNT(*) FROM EMP_TAB B
WHERE B.SAL > A.SAL)
Change value of 1 if
0 - First heighest sal
1 - Second " "
2 - Third heighest sal
.
.
.
| Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
What is an oracle stored procedure?
What are database links used for?
What is the purpose of my sql?
What does count (*) mean in sql?
What are the built in functions of sql?
What is implicit cursor in pl sql?
How many types of cursors are available in pl/sql?
what is bcp? When is it used?
What are different sql data types?
How do I save the results of sql query in a file?
What is the purpose of the sql select top clause?
What are all different types of collation sensitivity?
How do I start sql from command line?
Is sql low level language?
What is on delete set null?