我有两个不同的表:Table_a和Table_b,它们都有相同的列PartNo和Material_Desc.当PartNo等于时,我希望Table_b中的Material_Desc更新Table_a中的Material_Desc.这是我的疑问
MERGE INTO Table_b USING ( SELECT t1.rowid AS rid,t2.Material_Desc FROM Table_b t1 JOIN Table_a t2 ON Table_b.PartNo = Table_a.PartNo ) ON rowid = rid WHEN MATCHED THEN UPDATE SET Table_a.Material_Desc = Table_b.Material_Desc;@H_403_3@我知道Oracle不支持更新语句的连接,所以我尝试了上面的查询.它仍然给了我ORACLE ORA-00969:缺少ON关键字错误
解决方法
你可以把“(”和“)”.所以写:
ON(rowid = rid)