--建测试表
CREATE TABLE T_UserInfo
(
Userid varchar(20), UserName varchar(20),
RegTime datetime, Tel varchar(20),
)
--插入测试数据
DECLARE @I INT
DECLARE @ENDID INT
SELECT @I = 1
SELECT @ENDID = 100 --在此处更改要插入的数据,重新插入之前要删掉所有数据
WHILE @I <= @ENDID
BEGIN
INSERT INTO T_UserInfo
SELECT ‘ABCDE‘+CAST(@I AS VARCHAR(20))+‘EF‘,‘李‘+CAST(@I AS VARCHAR(20)),
GETDATE(),‘876543‘+CAST(@I AS VARCHAR(20))
SELECT @I = @I + 1
END
时间: 2024-07-29 03:20:28