declare @i int
set @i = 1999
while(@i<2009)
begin
declare @sql varchar(8000)
set @sql = 'update
dbo.cltj'+ltrim(str(@i))+'
set ydw = ''Ten Thousand Tons'''
set @i = @i+1
exec(@sql)
end
sqlserver while 用法
最新推荐文章于 2024-09-09 04:53:58 发布