declare @i intset @i = 1999while(@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