我有一個更新查詢,我試圖更新一個字段,但對於多個記錄,我正在嘗試一個連接,但它不起作用。下面我從select語句中得到多個值,但我認爲我的語法在下面不正確。如何使用另一個表上的連接更新Oracle中的表?
UPDATE [email protected] x
INNER JOIN (
select g.prev_perm_ret, g.itm_cd
from gm_prc_reg_prc_items g, [email protected] b
where g.itm_cd=b.stylecode
and b.storecode=00000
and g.prev_perm_ret<>b.listprice
and g.prev_perm_ret>g.ret_prc
and b.sellprice=b.listprice
) y ON x.stylecode=g.itm_cd
SET x.listprice=y.prev_perm_ret
使用融爲一體。 – fabribara 2014-12-06 05:16:23