declare @index int;
declare @sql nvarchar(2000);
set @index=1;
while @index<=851

begin

set @sql='alter table visitlog'+CONVERT(NVARCHAR(20), @index)+' alter column [OS] nvarchar(30) null;';
set @index=@index+1;
begin try
exec(@sql);
end try
BEGIN CATCH
    print 'error';    print @index;
    print ERROR_MESSAGE();
end catch


end

相关文章:

  • 2022-01-14
  • 2021-10-17
  • 2022-01-11
  • 2021-10-01
猜你喜欢
  • 2021-08-05
  • 2022-12-23
  • 2021-11-05
  • 2021-09-09
  • 2022-01-12
  • 2022-12-23
  • 2021-08-21
相关资源
相似解决方案