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

Can you create a logon trigger in sql server 2005 express edition?

0 Answers  


The Difference between 'Count' and 'Count(*)'

13 Answers  


In what sequence sql statement is processed?

0 Answers  


explain the type of contraints

3 Answers  


What are partitioned views?

0 Answers  


Well sometimes sp_reanmedb may not work you know because if some one is using the db it will not accept this command so what do you think you can do in such cases?

2 Answers  


What is the diffrence between update_one and auto_fix?

3 Answers   IBM,


How we can compare two database data?

0 Answers  


What is difference between clustered and non clustered index?

0 Answers  


Insert syudents details in table.Current system date &time insert into joining time.How do insert?( in sysdate only return current system date how do add time?)

0 Answers  


Do you know what is openxml in sql server?

0 Answers  


Explain the disadvantages of cursors?

0 Answers  


Categories