update t_tradeItem set currencyValue=
(
select currencyValue from t_tradeItem t2
where t2.transactionPOID=t_tradeItem.transactionPOID and t2.tradeItemType=1
)
where tradeItemType=0;
外层的t_tradeItem 不能用别名 有点恶心
update t_tradeItem set currencyValue=
(
select currencyValue from t_tradeItem t2
where t2.transactionPOID=t_tradeItem.transactionPOID and t2.tradeItemType=1
)
where tradeItemType=0;
外层的t_tradeItem 不能用别名 有点恶心