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 |
25. Display the client number and the value of the highest value order placed by that client.
State and explain the different types of data models?
1. How actually index will work ? 2. Why do people prefer mostly bitmap index and btree index in datawarehouse ? 3. If I use the column in aggrigate functions like max,min,count and avg and if I have a index created on that column, will it increases the performance ?
Is primary key indexed by default in oracle?
How many categories of data types?
What are the components of logical database structure in oracle database?
How to set a transaction to be read only in oracle?
2. Display the post code and the total number of purchase orders placed with creditors in that post code.
Are truncate and delete commands same? If so why?
How to save query output to a local file?
How to define and use table alias names in oracle?
What is different bet native dynamic sql and Dbms_Sql?