常用的T-SQL语句

 

循环插入表数据

declare @i int
set @i = 1;
while(@i <= 31)
begin

insert into dbo.GoldOrders(OrderID,GoldCount,CharacterName)values(@i,
22+@i,'jimji'+CONVERT(nvarchar(50),@i)
)
set @i = @i +1;
end

posted @ 2012-07-25 10:41  吉桂昕  阅读(165)  评论(0编辑  收藏  举报