34,590
社区成员
发帖
与我相关
我的任务
分享
2005中就用 insert into ,update然后用条件控制
应该会多写几句
insert into InventoryMaster
select InvertoryId,Descr from InventoryMaster im full join NewInventory src on im.Inventory=src.InventoryId
where im.Inventory is null
update im set im.Descr=srcDesr from InventoryMaster im full join NewInventory src on im.Inventory=src.InventoryId
where im.Inventory is not null and src.Inventory is not null