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 |
What happens if you lost a data file?
How to open and close an explicit cursor in oracle?
How do you find current date and time in oracle?
What is proxy method?
What is a cluster?
How would you edit your CRONTAB to schedule the running of /test/test.sh to run every other day at 2PM?
What is meant by raw datatype?
Database is hung. Old and new user connections alike hang on impact. What do you do? Your SYS SQLPLUS session IS able to connect.
Which Database is the best for the Security issue ? 1. DB2 2.SQL Server 3.MySQL 4.ORACLE
In which language oracle has been developed?
Anybody can tell me, how do we find second largest emp salary from emp table.. Thanks in advance ...
10 Answers Cognizant, ID, NTTF Nettur Technical Training Foundation, Sony, Verizon,
emp numb is unique because that is primary key,,but what is foreign key .. explain very clear with example