how to find the second highest salary from emp table?

Answer Posted / karthik.k

select max(salary) as second_highest from emp where salary
< (select max(salary) from emp)

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what are all the common sql function? : Sql dba

573


How do rank () and dense_rank () differ?

512


Is trigger a stored procedure?

498


What is nvl?

605


What are the different types of sql commands?

591






Why join is faster than subquery?

594


Why do we use set serveroutput on?

506


What is the largest value that can be stored in a byte data field?

516


Can you selectively load only those records that you need? : aql loader

605


what are the difference between clustered and a non-clustered index? : Sql dba

517


Explain architecture of sql server notification services?

616


what are the advantages a stored procedure? : Sql dba

538


What is cascade in sql?

551


Is there a 64 bit version of ssms?

506


If i can use sys.check_constraints to display my constraints from my database using sql server 2005, how can i display then if i am using sql server 2000????

3543