8 Replies Latest reply on Jul 2, 2010 11:47 AM by Sozy

    execute immediate with UPDATE with RETURNING clause

      I 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.