Thursday, October 16, 2008

at 8:11 AM Posted by senthil

Paging in SQL Server 2005 Using RowNumber()

Go

(

SELECT top 10 content_title, content_id, ROW_NUMBER() OVER (order by go_live) AS 'RowNumber' into #temp1 FROM content

)

SELECT * FROM #temp1 WHERE RowNumber between 4 and 7;

GO

drop table #temp1


------------------------------------------------------------------------------------------------------------


0 comments: