Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Answer Posted / sandip

SELECT MAX(SAL) FROM EMPLOYEE WHERE SAL<(SELECT MAX(SAL)
FROM EMPLOYEE);

I don't think this will work correct me if i am
wrong.Correct one is-------

SELECT MAX(SAL) as SAL FROM EMPLOYEE WHERE SAL<(SELECT MAX(SAL)
FROM EMPLOYEE);

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is rollback? : Sql dba

1118


Difference between truncate, delete and drop commands?

1092


Do we need to create index on primary key?

933


What is trigger explain with example?

1048


What are some predefined exceptions in pl/sql?

1175


How to read xml file in oracle pl sql?

921


Is coalesce faster than isnull?

976


write an sql query to find names of employee start with 'a'? : Sql dba

1039


What is attribute indicator in pl sql?

1022


What is a pdo connection?

1055


Does inner join remove duplicates?

948


What does sql stand for?

1003


What is a database event trigger?

1168


Can there be 2 primary keys in a table?

1006


explain advantages of innodb over myisam. : Sql dba

1137