I have the following table:
CREATE table prd ( prdid varchar(10) ) insert into prd values (\'prd1011\'),(\'prd1023\'),(\'prd4532\'),(\'prd2341\')
You've failed to specify SQL Server version or motivation for the request.
A SQL Server 2012+ method
SELECT prdid, COUNT(*) OVER (ORDER BY prdid ROWS UNBOUNDED PRECEDING) FROM prd
SQL Fiddle