how to get second highest salary in SQL(as/4000
Answer Posted / santosh kumar
select employee_id,last_name,salary
from
(select rownum r,employee_id,last_name,salary
from (select employee_id,last_name,salary from employees
order by salary desc)) a
where a.r=&nth_salary;
---u can find nth highest salary----
for more detail u can contact me at
rajgupta7666@gmail.com....
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
what is the difference between where clause and having clause? : Sql dba
Why do we use sql constraints? Which constraints we can use while creating database in sql?
How do I audit the sql sent to the server?
what is a scheduled jobs or what is a scheduled tasks? : Sql dba
Explain how to use transactions efficiently : transact sql
what is the command used to fetch first 5 characters of the string? : Sql dba
What are the types of optimization?
How do I view tables in sql developer?
Is hadoop a nosql?
What is sql not null constraint?
What is the difference between rollback and rollback to statements?
What are the two virtual tables available at the time of database trigger execution?
Can we create view in stored procedure?
what are the differences between public, private, protected, static, transient, final and volatile? : Sql dba
Is primary key always clustered index?