how to find the second highest salary from emp table?
Answer Posted / praveen kumar.dandu
select a.sal,rank from(select sal,rank() over (order by sal
desc))a where rank=&n
<Here after printing the ranks we can retrieve we can
retreive what ever the rank we want>
| Is This Answer Correct ? | 2 Yes | 4 No |
Post New Answer View All Answers
What are different types of sql?
What are the different types of a subquery?
How we can update the view?
Which is better join or inner query?
What is difference between rank () row_number () and dense_rank () in sql?
how to use case expression? : Sql dba
Where is all the data on the internet stored?
what is query cache in mysql? : Sql dba
what is rdbms? : Sql dba
What is the difference between partition and index?
What is a temporal table?
what does the t-sql command ident_current does? : Transact sql
How can we make an if statement within a select statement?
what is a materialized view? : Sql dba
What is sql stand for?