Depending on the version of your SQL Server, you can do the following:
SQL 2000
For SQL 2000, I believe there should be a unique ID for you to be able to do it. Not sure if there are solutions that does not require you to have a unique ID.
SELECT
tbl2.PKID,
tbl2.ID,
(select count(1) from table1 where PKID <= tbl2.PKID and ID = tbl2.ID) AS RowNumber
from table1 tbl2
order by ID, RowNumber
SQL 2005
SELECT
tbl1.ID,
ROW_NUMBER() OVER(PARTITION BY ID ORDER BY ID) AS RowNumber
from table1 tbl1