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 |
Is java required for oracle client?
How to pass parameters to procedures in oracle?
if i have a procedure with 1000 line.when i run this in 61 line i got the error but i want to continue the programe without error.can anyone tell me how to handle that error.
How many types of tables supported by oracle?
Explain the use of consistent option in exp command.
How to use existing values in update statements using oracle?
From the database level, how can you tell under which time zone a database is operating?
We have one Package(which has many function/procedures, SQL quires etc). Now we need to check, which query or procedure is taking lot of time in that Package. ? How do we do it.
How to Select second Maximum salary in a Table ?
If server is in US and client is in india there is timezone is diffrence, How can we display date in indian time when data is displayed from US server timezone?
How to store only time; not date and time?
write a query to count number of alphabets in given string for example "APPLE" write a query to generate sequence from 50 to 100 write a query to display in single string "ABCD,EFGH,IJKL,PQRS"