execute immediate with UPDATE with RETURNING clause
SozyJul 2 2010 — edited Jul 2 2010I would like to update a table that name is not known at run time and also want it return the updated value.
UPDATE unknown_table_name
SET salary = salary * 1.1
WHERE department_id = 100
RETURNING employee_id BULK COLLECT INTO empid_list;
If without requirement of returning clause, we would achieve it with the "execute immediate" but with the returning clause, is it also possible with "execute immediate" ? if possible, could you please show me an example.
If not possible, is there another way to implement a dynamic update statement with returning clause?
Appreciate all responses.
Sozy