Assuming you want row number or index as you call it to match the order of column1, here are some suggested methods for getting the result you want.
Method 1: Could become a stored procedure with two parameters, @starttindex and @endindex.
Declare @startindex int, @endindex int
Select @startindex=100, @endindex=199
Create table #temp(Column1 varchar(30), ID int identity)
Set Rowcount @endindex-1
Insert #temp(column1)
Select column1 From Table1
Order By column1
Set rowcount 0
Select *
From Table1 t1
Join #temp t2
On t1.column1=t2.column1
Where t2.ID>StartIndex
Method 2: This assumes the table doesn't already have an identity column and that one can be added. It also assumes that the new values in column1 will always be greater than the current maximum value.
a) Add a clusterd index on column1 if possible. If this index already exists, go to the next step. If it is not possible or not advisable to add a clustered index, skip this method.
b) With the clustered index in place, the data will be sorted in the index order. Add an identity collumn to the table. SQL Server will create incremented values in the order of the data.
c) Add a unique index on the new identity column.
d) Select from the table with a query like the following.
Select *
From table1
Where ID>@startindex and ID<@endindex
Method 3: Not advisable if the table is very large. Has the advantage of not requiring table modifications or creation of a temporary table.
Select *
From table1 t1
Where
(Select count(*)
From table1
Where column1<t1.column1)
Between @startindex And @endindex
Terry L. Broadbent - DBA
SQL Server Page:
If you want to get the best answer for your question read faq183-874.