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

What is a file delimiter?

1102


Explain scalar functions in sql?

1074


Why having clause is used in sql?

985


What are the rules to be applied to nulls whilst doing comparisons?

1327


Lookups are a key component in sql server integration services (ssis). Explain its purpose?

1010


Can %notfound return null after a fetch?

1064


What is raid? How does it help storage of databases?

1089


How do I view stored procedures?

980


what are myisam tables? : Sql dba

1038


What are local and global variables and their differences?

1096


What is example of database?

1062


what is 'trigger' in sql? : Sql dba

1091


Can you select everything, but 1 or 2 fields, without writer's cramp?

986


Explain the the update statement in sql?

1045


What is a recursive stored procedure?

1188