how to calcuate the second highest salary of he employee
Answer Posted / eshwer
Try this
select * from (SELECT empno,sal, DENSE_RANK() OVER (ORDER BY sal desc) AS SalRnk
FROM scott.emp) where salrnk=2;
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is sql key?
What is the use of partition by in sql?
What is nosql db?
how to fetch common records from two tables? : Sql dba
What is foreign key and example?
How do I add a primary key to a table?
Does truncate need commit?
How to generate a salary slip like jan 1000 1000 feb 1000 2000 ... dec 1000 12000
How do you declare a user-defined exception?
1. is it possible to use the cursor atttibutes (%found ,% rowcount , %isopen , %notfound ) to our user defined cursor names ....... cursor cursor_name is select * from scott.emp if you use... cursor_name%found , %rowcount ,%isopen,%notfound...will it work... -------------------------- 2.what is the difference between the varray and index by table .. -------- 3. type type_name is table of number(8,3) index by binary_integer; identifier_name type_name; first , last , prior , next ,trim are the methods we can use it for the above type...simillary is there any way to apply for cursors... with thanks and regards..sarao...
how to use myisamchk to check or repair myisam tables? : Sql dba
Can primary key be changed?
Explain the uses of database trigger.
What is left join example?
how to convert character strings to dates? : Sql dba