发布网友 发布时间:2022-04-11 15:42
共6个回答
热心网友 时间:2022-04-11 17:11
要想同时插入必须通过线程才能实现 并发,大体代码如下:热心网友 时间:2022-04-11 18:29
写个循环 就ok 了热心网友 时间:2022-04-11 20:04
写个循环,把要插入的做的循环,或者用批处理热心网友 时间:2022-04-11 21:55
create table tb(num int)热心网友 时间:2022-04-12 00:03
CREATE TABLE number
(
number BIGINT
)
;WITH a AS
(
SELECT 0 AS n
UNION ALL
SELECT 0
),
b(n) AS
(
SELECT 1 FROM a,a AS b
)
,
c(n) AS
(
SELECT 1 FROM b,b AS c
),
d(n) AS
(
SELECT 1 FROM c,c AS d
),
e(n) AS
(
SELECT 1 FROM d,d AS e
),
f(n) AS
(
SELECT 1 FROM e,e AS f
)
,g(n) AS (
SELECT ROW_NUMBER() OVER(ORDER BY f.n) FROM f
)
INSERT INTO dbo.number
SELECT n FROM g WHERE n<=100000000
热心网友 时间:2022-04-12 02:28
批量导入