SQL SERVER批量修改表名前缀
比如前缀由mms_修改为 ets_
exec sp_msforeachtable
@command1='
declare @o sysname,@n sysname
select @o=''?''
,@n=stuff(@o,1,charindex(''].[mms_'',@o)+6,''ets_'')
,@n=left(@n,len(@n)-1)
exec sp_rename @o,@n',
@whereand=' and o.name like ''mms_%'''