Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
peaceworld
Starting Member
1 Post |
Posted - 2008-03-05 : 07:59:59
|
| Hi, How to display specific number of records? That means I want to display records starting from 3th row to 5th row. Please send your suggestions or links.Table-----Name Age-----------------Raja 23Kumar 26Suresh 30Rani 22Subha 32Ganesh 25The result will be Name Age-----------------Suresh 30Rani 22Subha 32Thanx.GANESAN MURUGESAN |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-03-05 : 08:05:54
|
| [code]SELECT t.Name, t.AgeFROM(SELECT ROW_NUMBER() OVER (ORDER BY PKCol) AS RowNo, Name, Age FROM YourTable)tWHERE t.RowNo >=3 AND t.RowNo <=5[/code]PKCol is Primary key of your table.Please note that this works only in SQL 2005 |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-03-05 : 08:14:17
|
| Also search for paginationMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|