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


please tell me the query to get details of the employee
having the second largest salary

Answers were Sorted based on User's Feedback



please tell me the query to get details of the employee having the second largest salary..

Answer / ravikiran

select top 2(salary) from emp_sal where
salary in (select sal from emp_sal order by sal desc)

Is This Answer Correct ?    2 Yes 3 No

Post New Answer

More SQL Server Interview Questions

What is meant by indexing?

0 Answers  


How to edit table in sql server 2017?

0 Answers  


Where do we generally create INDEX?

1 Answers   Ernst Young, Thomson Reuters,


What is resource db in sql server?

0 Answers  


table:employee EID ENAME MID(manager ids) 101 rama null 102 sita 101 103 siva 101 104 ganesh 103 . . . . . . for 103 ID the manager ID is 101(RAMA) and for 104 manager is SIVA if i give employee id (EID) you have to tell the manager for that EID write query? eample:if i give 102 .The query output should be manager for 102 ID that it should print RAMA as output

7 Answers  


i want to create procedure for create table in sql server 2005 for example create procedure create_table @table varchar(20) as create @table( id int, name char(20) ) but it will get error what is solution?

5 Answers   Aptech,


how can you select rexcord(rows) from table A which is not present in Table B . Id being the FK in Table B referencing to ID Table A

0 Answers   United Healthcare,


what are the advanced features in sql 2008?

2 Answers   Wipro,


How to create prepared statements using odbc_prepare()?

0 Answers  


what does the automatic recovery do? : Sql server administration

0 Answers  


Can we perform backup restore operation on tempdb? : sql server database administration

0 Answers  


how many triggers you can have on a table? : Sql server database administration

0 Answers  


Categories