小成博客

2010年到了...
  首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

SQL批量循环插入数据

Posted on 2007-07-04 13:06  成斌  阅读(525)  评论(0)    收藏  举报
declare @a int,@b int
set @a=1
set @b=1
while @a<100000
begin
   
insert into test_table (news_title,news_content) values(@a,@b)
   
set @a=@a+1
   
set @b=(@a+1)*5-2
end