declare @sql varchar(max)
set @sql=''
select @sql=@sql+' alter table '+[name]+' add DbName nvarchar(30) '
from sys.tables
exec(@sql)
exec sp_msforeachtable 'alter table ? add DbName nvarchar(30)'
declare @sql varchar(max)
set @sql=''
select @sql=@sql+' alter table '+[name]+' add DbName nvarchar(30) '
from sys.tables
exec(@sql)
exec sp_msforeachtable 'alter table ? add DbName nvarchar(30)'