Write a query to get 2nd maximum salary in an employee table ?

Answer Posted / abhay

Select Max(Sal)
From Emp E
Where E.Sal < (Select Max(Sal) From Emp)

Is This Answer Correct ?    9 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the benefit of foreign key?

528


What is database white box testing and black box testing?

636


i have some prob lem to tell me about my self in interview first round ...

1704


What is an escape character in sql?

564


How do I tune a sql query?

514






What action do you have to perform before retrieving data from the next result set of a stored procedure ?

2095


What is the difference between partitioning and sharding?

530


What is vector point function?

571


Why truncate is faster than delete?

565


Can we insert data in view?

507


How do I run a pl sql program?

629


What are sql functions? Describe in brief different types of sql functions?

488


Why procedure is used in sql?

533


What are stuff and replace function?

574


How do I enable sql encryption?

518