由于之前2张关联表的数据结构做了变化,一个表的字段移植到了另外一张表。
需要将数据也更新过去。百度搜索到,改了下
update [dbo].[Product]
set[BrandName] = t2 .[BrandName]
,[CompanyId] = t2 .[CompanyId]
,[Unit] = t2 .[Unit]
,[Origin] = t2 .[Origin]
,[IsShowInList] = t2 .[IsShowInList]
,[IsVirtualProduct] = t2 .[IsVirtualProduct]
,[IsAllowReturn] = t2 .[IsAllowReturn]
,[TemplateId] = t2 .[TemplateId]
,[GroupSort] = t2 .[GroupSort]
,[SaleChannel] = t2 .[SaleChannel]
,[Sys_Platform] = t2 .[Sys_Platform]
from [Product] t1 left join[ProductGroup] t2
ON
t1.GroupId = t2.id