from the table display the 2nd highest salary?
and also the least 2nd salay?
Answer Posted / mehul
for 2nd highest salary
select max(salary) from employee where salary<(select max
(salary) from employee )
for 2nd least salary
select min(salary) from employee where salary>(select min
(salary) from employee )
i hope that will help you
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
Difference between uniqe index and uniqe constraint?
What is user defined datatypes and when you should go for them?
What is usually the first word in a sql query?
What are triggers? How do you invoke a trigger on demand?
What is the difference between the application object and session object?
How to create an inline table-valued function?
What happens if ntwdblib.dll is missing on your machine?
You want to implement the one-to-many relationship while designing tables. How would you do it?
What are secondary xml indexes?
What are database states in ms sql server?
You have developed an application which uses many stored procedures and triggers to update various tables users ocassionally get locking problems which tool is best suited to help you diagnose the problem?
How to write an inner join with the where clause in ms sql server?
Can we use pragma autonomous_transaction in trigger?
What is a coalesce function?
What is the standby server?