当前位置:Gxlcms >
数据库问题 >
简单的sqlserver批量插入数据easy batch insert data in sqlserver
简单的sqlserver批量插入数据easy batch insert data in sqlserver
时间:2021-07-01 10:21:17
帮助过:24人阅读
DECLARE @pid INT,@name NVARCHAR(50),@level INT,@i INT,@column2 INT
SET @pid=0
SET @name =‘first‘
SET @level =5
SET @column2=0
SET @i=0
WHILE @i<30 --30为你要执行插入的次数
BEGIN
INSERT INTO table_name ( pid, name,level, column2)
VALUES ( @pid, @name,@level,@column2)
SET @i=@i+1
END
简单的sqlserver批量插入数据easy batch insert data in sqlserver
标签:fir values insert first declare table column i+1 ble