我必须更新一个由3个表的连接返回的值的字段。
例子:
select
im.itemid
,im.sku as iSku
,gm.SKU as GSKU
,mm.ManufacturerId as ManuId
,mm.ManufacturerName
,im.mf_item_number
,mm.ManufacturerID
from
item_master im, group_master gm, Manufacturer_Master mm
where
im.mf_item_number like 'STA%'
and im.sku=gm.sku
and gm.ManufacturerID = mm.ManufacturerID
and gm.manufacturerID=34
我想更新表item_master的mf_item_number字段值,使用在上述条件中连接的其他一些值。
如何在MS SQL Server中做到这一点?