SELECT TOP 10 * FROM (SELECT ROW_NUMBER() OVER (ORDER BY owner) AS RowNumber, *, TotalRows = Count(*) OVER () FROM Table_1) _tmpView ORDER BY owner
SELECT TOP (10) * FROM dbo.Table_1
-- Just declare a variable "@index" in stored procedure and pass it value from your -- application, which will supply it 1,2,3... declare @index int set @index = 3 select top ( 10 * @index) * into #t from dbo.tablename order by name select * from #t order by name select top 10 * from #t order by name desc drop table #t
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)