标签:
select a.[id], a.[name],b.name, ‘UPDATE ‘+ a.name+ ‘ SET Nd=‘‘2015‘‘‘ + ‘ where Nd=‘‘2014‘‘‘ from [sysobjects] a left join [syscolumns] b on a.id=b.id where a.[type] = ‘u‘ and b.name=‘Nd‘ order by a.name
查询出数据,拼出SQL字符串,然后执行它
更新SQL SERVER中所有表中包含字段为[Nd]的表值数据
标签:
原文地址:http://www.cnblogs.com/allen76615519/p/4180259.html