Oracle
 sql >> Base de Dados >  >> RDS >> Oracle

A tabela ora-04091 é mutante-


Chade eu tentei esta opção, não me deu nenhum erro.
CREATE OR REPLACE PROCEDURE updatetabble1 AS
    BEGIN
        MERGE
        INTO Table1 DBC
        USING  (            Select ename from
            (
            Select ename
            from
                (
                Select ename, column1||Column2||Column3 from table1
                union
                Select ename, column1||Column2||Column3 from table2 
                ) 
            ) 
        GROUP BY ename HAVING count(*) > 1
        ) TBL_MAIN
                 ON ( DBC.empname = TBL_MAIN.empname)
                WHEN MATCHED THEN
 UPDATE SET DBC.DATA_CHANGED = 'Y';
COMMIT;     
END updatetabble1;