如何更新列级别的记录

时间:2017-12-22 10:09:26

标签: oracle oracle11g oracle-sqldeveloper


在SQL和T-SQL中,我已根据以下查询更新了记录:

Update Tablename1
SET  COlumn name : 
FROM Tablename1  one 
JOIN Tablename2  two
 ON one.PDPD_ID = two.PDPD_ID
AND one.TYPE =  two.TYPE

但是,在Oracle中,我无法执行查询。

任何帮助将不胜感激

1 个答案:

答案 0 :(得分:0)

也许是这样的?

UPDATE tablename1 one
   SET one.column_name =
          (SELECT two.some_column
             FROM tablename2 two
            WHERE t2.popd_id = t1.popd_id AND two.TYPE = one.TYPE);