Facing with issue with executing multiple statements, I assume issue appearing while trying to update from temp table to existing table, having the exception like ORA-00942: table or view does not exist
with the following query
begin
execute immediate 'CREATE PRIVATE TEMPORARY TABLE ORA$PTT_TMP AS SELECT ID,NAME from USERS WHERE 1 = 0';
execute immediate 'INSERT INTO ORA$PTT_TMP (ID,NAME) VALUES (:1, :2)' using 1,'NAME';
UPDATE USERS2 t1
SET (t1.NAME) = (SELECT t2.NAME FROM ORA$PTT_TMP t2 WHERE t1.ID = t2.ID);
execute immediate 'DROP TABLE ORA$PTT_TMP';
end;
What I'm doing wrong here