select 编号=(select count(1) from 表 where 商品名<=a.商品名),商品名 
from 表 a
order by 编号