how to find the second salary?

Answer Posted / vamsi krishna

For 2nd maximum salary
select Max(sal) from EMP a where 2=(select COUNT(distinct(sal)) from EMP b where a.SAL<=b.SAL);

Is This Answer Correct ?    14 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is a self join? Explain it with an example? : Sql server database administration

502


What new data source types were added in ssrs 2014?

107


How to add code to the existing article (using improve article)?

595


How many columns can exist together per table?

709


What do mean by xml datatype?

617






What is query processing?

545


how many layers of tcp/ip protocol combined of? : Sql server database administration

530


Explain the ways to controlling cursor behavior?

546


What are the security related catalog views? : sql server security

538


What number sorts of privileges are accessible in sql?

600


Give me a SQL Query to find out the second largest company?

694


How to create an index on an existing table in ms sql server?

499


Can you import Microsoft Excel data to SSRS?

89


How to create a stored procedure with a statement block in ms sql server?

578


Explain about service Broker functions?

617