select row_number() over(排序条件,必不可少),字段名(也可以是*) from 表名
select row_number() over(order by id asc),id,name from table1