SELECT TOP 1000000 row_number() over(ORDER by sv.number) AS num
INTO numbertest
from master..spt_values sv CROSS JOIN master..spt_values sv2
SELECT TOP 1000000 IDENTITY(int,1,1) AS Number
INTO NumberTest
FROM master..spt_values sv1
CROSS JOIN master..spt_values s2
我遇到了两种在表格中插入 1 到 1000000 个数字的方法,它们可以完美地工作,但不能按顺序插入 1 到 1000000?如何以快速插入速度顺序插入?