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 do I find duplicates in the same column?
How do I count rows in sql query?
Explain two easy sql optimizations.
How to read xml file in oracle pl sql?
How do I order columns in sql?
What does the sign mean in sql?
Is nosql relational?
Can you do multiple joins in sql?
What is sqlca in db2?
how would you enter characters as hex numbers? : Sql dba
What do you understand by case manipulation functions?
How many tables can a sql database have?
Can pl sql procedure have a return statement?
How do I truncate a word?
how many sql ddl commands are supported by 'mysql'? : Sql dba