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 the two types of periodical indexes?
What is a dirty read sql?
how to use like conditions? : Sql dba
how to get @@error and @@rowcount at the same time? : Sql dba
Can primary key be changed?
What is difference between pl and sql?
What is a sql statement?
name 3 ways to get an accurate count of the number of records in a table? : Sql dba
What is having clause in sql?
Can a commit statement be executed as part of a trigger?
what is the command used to fetch first 5 characters of the string? : Sql dba
Why cross join is used?
What are the sql aggregate functions?
What is database sql?
How many triggers can be applied on a table?