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
How to change sql*plus system settings?
What does subquery mean in sql?
Explain the uses of a database trigger?
How do you determine the current isolation level? : Transact sql
What is Collation Sensitivity ? What are the various type ?
What is optimistic concurrency control? : Transact sql
Is not equal in sql?
What are the three forms of normalization?
How to use boolean type in select statement?
What is the execution plan in sql?
which command using query analyzer will give you the version of sql server and operating system? : Sql dba
What are different types of sql commands?
what are numeric data types? : Sql dba
Write a sql query to get the third highest salary of an employee from employee_table?
Can you rollback after commit?