在这里,我想您必须执行以下步骤:
DECLARE @string varchar(max)For each table in sys.Objects (where type='U') For each column of the above table IF EXISTS(select * from tablename where colname like '%'+@string+'%') update table tablename SET colnmae=REPLACE(colname,'old','new') where colname like '%'+@string+'%')



