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?

Answers were Sorted based on User's Feedback



how to retrive only second row from table in sql server 2000?..

Answer / ramana

Table Like this

Create Table Employee(Name varchar(20),Location
varchar(20),Salary int)

Query Like this

Select top 1 * from employee where Name not in(select top 1
Name from Employee)

it will display second record....

Is This Answer Correct ?    2 Yes 2 No

how to retrive only second row from table in sql server 2000?..

Answer / madhuparna

select top 1 * from (select top 2 * from employee)A

Is This Answer Correct ?    0 Yes 0 No

how to retrive only second row from table in sql server 2000?..

Answer / prabhat sharma

select top 1 * from xyz where rno > (select top 1 rno from xyz)

rno is a column name and xyz is a table name

Is This Answer Correct ?    0 Yes 0 No

how to retrive only second row from table in sql server 2000?..

Answer / 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

how to retrive only second row from table in sql server 2000?..

Answer / ravi

select top 2 from tablename

Is This Answer Correct ?    6 Yes 28 No

Post New Answer

More SQL Server Interview Questions

Does index slows down insert statements?

0 Answers  


What r sql reporting services and analysis services? how can we use it.

2 Answers   Microsoft,


What is the difference between having and where clause?

4 Answers  


Where are magic tables stored ? Is it in the same database where it is created ?

4 Answers  


Explain what are db_options used for?

1 Answers   InterGraph,


Explain different types of lock modes in sql server 2000?

0 Answers  


What are sql server procedures?

0 Answers  


What is table level trigger?

0 Answers  


What are distributed partitioned views?

0 Answers  


What is the use of toad or sqldbx.?

0 Answers   MCN Solutions,


SQL Server Performance Tuning for Stored Procedures & reducing debugging time?

1 Answers   CarrizalSoft Technologies,


How to create function without parameter in sql server?

0 Answers  


Categories