SQL语句の循环添加数据

declare @i int
set @i=1
while @i<=1000
begin
insert into News_ITM(title,msg,subDateTime,author,imagePath) values('TITLE'+cast(@i as nvarchar(50)),'内容'+cast(@i as NCHAR),GETDATE(),'admin',null)
set @i = @i +1
end

posted @ 2015-12-03 15:22  熊大大-  阅读(825)  评论(0编辑  收藏  举报