用测试数据填充表

--填充表
create proc [dbo].[filltable]
(@rows int)
as
DECLARE @INT AS INT
SET @INT = 0
WHILE @INT < @rows --这里设置需要插入多少行
BEGIN
SET @INT = @INT + 1
INSERT INTO test (name) SELECT substring(cast(newid() as nvarchar(40)),0,10)
END
--exec filltable 900000000
posted @ 2009-08-11 11:23  左少白  阅读(169)  评论(0编辑  收藏  举报