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...

how to find the second highest salary from emp table?

Answer Posted / rahul thakur

select top 1 salary from emp where id not in (select top1 id from emp order by salary desc)order by salary desc.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I view stored procedures?

918


What is the difference between database trigger and stored procedure?

1008


what are date and time intervals? : Sql dba

999


Does truncate remove indexes?

972


What is meant by user defined function?

988


How can you select unique records from a table?

995


Is json a nosql?

917


How do I write a cron which will run a sql query and mail the results to agroup?

915


what is view? : Sql dba

914


What is the difference between inner join and left join?

939


What is the difference between inner join and outer join?

931


What are the uses of merge?

1120


what is a primary key? : Sql dba

984


What are the most important ddl statements in sql?

1027


What is cost in sql execution plan?

909