select Row_NUMBER() OVER (ORDER BY  ASC) AS 序号,a.* from table a

或者:

select RANK() OVER (ORDER BY  ASC ) AS 序号,a.* from table a