Write query to fetch second maximum salary from employee table.
Answers were Sorted based on User's Feedback
Answer / ritesh
select max(salary) from emptable where salary < (select max(salary) from emptable);
Is This Answer Correct ? | 8 Yes | 0 No |
Answer / vijayalakshmi
select top 1 Coumn_Name from (select top 2 Coumn_Name from Table_name order by Coumn_Name desc) b order by Coumn_Name
Is This Answer Correct ? | 4 Yes | 0 No |
select a.last_name,a.salary from employees a where 3=(select count(*) from employees b where b.salary>a.salary) order by a.salary desc.
<<<<<<<<<[N-1]>>>>>>>>>>
Is This Answer Correct ? | 3 Yes | 1 No |
Answer / santosh kumar
select * from(select rownum r,ename,sal from(select * from emp order by sal desc))where r=2;
Is This Answer Correct ? | 0 Yes | 0 No |
How to select the name of employee who is getting maximum sal with out using subquery
How to convert dates to characters in oracle?
Typically, where is the conventional directory structure chosen for Oracle binaries to reside?
What is system tablespace?
which is best insttute for teradata,sybase,mysql,oracle in hyderabad
Can we write insert statement in function in oracle?
What are the advantages of oracle 12c?
From the following identify the non schema object: packages, triggers, public synonyms, tables and indexes.
How many types of tables supported by oracle?
17. Display the order number and average item cost for each order.
Explain self joins in oracle?
What are cursor?where are they used?