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 load data files into tables with 'mysqlimport'? : Sql dba

1094


Explain the types of joins in sql?

1035


Is primary key clustered index?

950


Can we call a function containing dml statements in a select query?

980


How is a PL/SQL code compiled?

1236


what is the difference between clustered and non clustered index in sql? : Sql dba

1128


Why do we create views in sql?

1154


what are the performance and scalability characteristics of mysql? : Sql dba

997


what are the advantages of sql ? : Sql dba

1060


What is sequence in sql?

1022


Is pl sql a scripting language?

1034


Is sql considered coding?

1049


What is the difference between microsoft access and sql?

1024


How can we store rows in PL/SQL using array?

1220


How can you know that statistics should be updated?

1079