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 / omkar hendre

select distinct(sal) from emp a where 2=(select count(distinct(sal)) from emp b where a.sal <=b.sal)

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is there a way to automate sql execution from the command-line, batch job or shell script?

918


how to convert character strings to dates? : Sql dba

983


What are the limitations of sql express?

986


What are the parts of a sql statement?

1028


What is trigger explain it?

960


what are the differences between char and varchar? : Sql dba

1002


Is natural join and inner join same?

853


What is difference between mysql and postgresql?

1043


What are expressions?

950


how many columns can be used for creating index? : Sql dba

897


Why do we go for stored procedures?

994


Can we join more than 2 tables in sql?

946


When you have to use a default "rollback to" savepoint of plvlog?

1124


What is the use of function in sql?

1028


What is a sql*loader control file?

1160