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
时间: 2024-10-19 21:05:49
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