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
How do I create a memory optimized filegroup?
what are the maximum number of rows that can be constructed by inserting rows directly in value list? : Transact sql
How do sql triggers work?
what is cross join? : Sql dba
What is the purpose of my sql?
Table 1: col1 Timestamp ---------------- 01-mar-2012 11:12:46 Table 2: col2 Timestamp -------------------- 01-mar-2012 11:12:10 01-mar-2012 11:11:23 Write a query to display a row with table2 col2 value less than tabl1 col1 value. Maximum timestamp value previous to table1 col1 value. Display a result as: Col1 col2 ----- ----- 01-mar-2012 11:12:46 01-mar-2012 11:12:10
Is sql the best database?
What action do you have to perform before retrieving data from the next result set of a stored procedure ?
What is forward declaration in pl sql?
Mention what problem one might face while writing log information to a data-base table in pl/sql?
Which column of the user triggers data dictionary view displays the database event that will fire the trigger?
What do you understand by pl/sql records?
What are the types of index in sql?
How does sql developer connect to oracle database?
what are the features and advantages of object-oriented programming? : Sql dba