how to find the second highest salary from emp table?
Answer Posted / esakki
select max(salary) from employee where salary not in (select
top 1 salary from employee order by salary desc )
change 1 to 2,3,4,......like that for 3rd max ,4th max
salary.....
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Can function return multiple values in sql?
Can we rollback after truncate?
What is embedded sql what are its advantages?
What is dba in sql? : SQL DBA
What are sql*plus environment variables?
Is a secondary key the same as a foreign key?
What is the difference between between and in condition operators?
What are the two types of exceptions in pl/sql?
Explain the the delete statements in sql?
Why is a primary key important?
What is bulk compiling in pl/sql.?
Can a foreign key be a duplicate?
What are different types of tables in sql?
What is sql partition?
Are dml statements autocommit?