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 rank function in sql?
What is the difference between pl and sql?
What language is oracle sql developer?
What is the starting oracle error number?
How do you create a unique index?
What are views in sql?
Does view contain data?
How do I find duplicates in a single column in sql?
What is difference between hql and native sql?
How you can copy a file to file content and file to pl/sql table in advance pl/sql?
Is left join faster than join?
how to calculate expressions with sql statements? : Sql dba
What is data definition language?
What is the advantage of index in sql?
How many sql core licenses do I need?