日期:2014-05-17 浏览次数:20500 次
UPDATE dbo.DP_ProductCoding SET Code = a.[新编码] FROM [DP6_Macro].[dbo].['替换--KA编码$'] a,dbo.DP_ProductCoding b WHERE a.[旧产品编码]=b.Code
SELECT 'alter table DP_ProductCoding drop ' + name FROM sys.objects WHERE parent_object_id = OBJECT_ID('DP_ProductCoding') AND type = 'UQ'
现在想改下需求,只需要把一对一的替换,这个代码怎么写啊?