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 retrive only second row from table in sql server
2000?

Answer Posted / jayaraman b

select min(emp_no) from
(select top 2 * from emp order by emp_no desc)A
--This will give you the 2nd largest Salaried employee

select max(emp_no) from
(select top 2 * from emp order by emp_no desc)A
--This will give you the 1st largest Salaried employee

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 function of master database?

114


can a table be moved to different filegroup? : Sql server administration

985


What is an inner join?

993


Do you know what is raid and what are different types of raid configurations? : SQL Server Architecture

1073


What is nonclustered index with included columns ?

973


What are date and time data types in ms sql server?

1104


Is oracle faster than sql server?

959


When setting replication, is it possible to have a publisher as 64 bit sql server and distributor or subscribers as a 32 bit sql server?

951


What is a hint?

1005


Write a SQL query to make a column as unique?

1046


What is the difference between row_number and dense_rank?

889


What is difference between equi join and natural join?

1051


Do you know nested transaction?

967


Can a table have 2 foreign keys?

912


Explain about unique identifier data type in sql server?

922