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 |
2. Display the item number and total cost for each order line (total cost = no of items X item cost). Name the calculated column TOTAL COST.
definition of cluster and non-clustered index?
What are a query and state the different types of queries and their uses?
Why do I get unexpected characters from 8-bit character sets in weblogic jdriver for oracle?
What is the use of oracle?
i can't insert column value greater than 4000 characters at one instance even i am using CLOB datatype . how to insert efficiently more than 4000 characters ? And please let me know how to impose inline and out-of line constraints on oracle column??? Thanks in Advance... Prakash
interview questions with answer for cts
How to write a query with a left outer join in oracle?
I'm doing my final year and i ve planned to do an oracle certification , is this the rit tim nd wat's the future scope??
Explain what are the uses of rollback segment?
A USER HAVING CREATE SESSION PREVILAGE CAN ALTER PASSWORD/CHANGE PASSWORD?
How to retrieve data from an cursor to a record?