update select bom_opcomponent.bomid,bom_parent.bomid from bom_opcomponent inner join bom_parent on bom_opcomponent.bomid = bom_parent.parentid
where optionsid is null
set bom_opcomponent.bomid = bom_parent.bomid
当然我这个更新查询的方法不正确,运行错误,其实我的意思是,更新一个表的内容,等于另外一个表的内容,但是这两个表有连系,但不知道如何写,请高人赐教.
where optionsid is null
set bom_opcomponent.bomid = bom_parent.bomid
当然我这个更新查询的方法不正确,运行错误,其实我的意思是,更新一个表的内容,等于另外一个表的内容,但是这两个表有连系,但不知道如何写,请高人赐教.
update bom_opcomponent
set bom_opcomponent.bomid = bom_parent.bomid
from bom_opcomponent inner join bom_parent on bom_opcomponent.bomid = bom_parent.parentid
where optionsid is null
Set A.F1 = B.F1,A.F2 = B.F2,.....
From A inner join B on A.PK = B.PK
set bomid=bom_parent.bomid
from
bom_opcomponent
inner
join bom_parent
on
bom_opcomponent.bomid = bom_parent.parentid
where
optionsid is null
update 出货明细1
set 出货明细1.数量 = 出货明细.数量
from 出货明细 inner join 出货明细1 on 出货明细.id=出货明细1.id
显示语法错误
这种更新理念是不是有问题哦