//在查询中添加一个自动编号的列
USE pubs
SELECT
IDENTITY(INT,1,1)AS id,job_desc,min_lvl
INTO #temp
FROM jobs
SELECT * FROM #temp ORDER BY id
DROP TABLE #temp

相关文章: