find out the second highest salary?
Answer Posted / annada
SELECT e.lastname,e.salary FROM employees e
WHERE 1=(SELECT count(*) FROM employess s
WHERE s.salary>e.salary
that will return 2nd highest salry .if we place insted of 1
as 2 then we can get 3 rd highest salary .
| Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
22. Display the order number, number of lines in the order, total number of items and total value for all orders that have a total value greater than $100
What is a parameter file in oracle?
How will you identify oracle database software release?
Why does Oracle not permit the use of PCTUSED with indexes?
Is there a combination of "like" and "in" in sql?
How to rename a column in an existing table?
What is an index associated with a constraint?
hi friends i completed b.com 2004.i have 3y accounting exp. in manufacturing company.now i have completed oracle finance.pls suggest me how will get job in oracle.can i get job in oracle.
How can I combine multiple rows into a comma-delimited list in oracle?
What is the difference between truncate & delete command?
How to assign a table row to a record variable?
How to use in conditions in oracle?
is there a tool to trace queries, like profiler for sql server?
What happens internally when the user types userID/password@string in SQL PLUS Thanks-Bhaskar
What are the database administrators utilities available?