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

How to write a single statement that concatenates the words ?hello? And ?world? And assign it in a variable named greeting?

1146


Explain correlated query work?

1109


how is myisam table stored? : Sql dba

1099


How to start the command-line sql*plus?

1111


Do ddl statements need commit?

1023


What are records give examples?

1054


What is an ndf file?

1066


Does asenumerable execute the query?

1097


Explain cursor types?

1086


What does where 1 1 mean in sql?

1079


How can you view the errors encountered in a trigger?

1025


What is string data type in sql?

1218


What is a recursive join sql?

1118


How to add new employee details in an employee_details table with the following details

1137


Are dml statements autocommit?

1095