declare
  -- UPDATE RETURNs many rows

  -- static SQL
  -- fails at 9.2.0 with PL/SQL: ORA-00936:
  -- missing expression
  --
  -- CANNOT AVOID NAMING COLUMNS YET

  --
  v_avg_hire_date employees_0.hire_date%type := '25-JUN-97';
  v_emprecs Emp_Util.emprec_tab_t;
begin
  update employees_0 set salary = salary * 1.1
    where hire_date < = v_avg_hire_date

    returning * bulk collect into v_emprecs
    /* this may or may not be the syntax that is supported in a later realease */;
end;
/
-- ERROR at line N:
rollback /* prepare for repeat or for next sample */;
-- Rollback complete.






declare
  -- WORKAROUND
  -- List all the columns for RETURNING in the SQL

  -- target out-bind CAN be a RECORD
  -- fails at 9.0.1 with PLS-00597:
  -- expression 'V_EMPRECS' in the INTO list is of wrong type
  v_avg_hire_date employees_0.hire_date%type := '25-JUN-97';
  v_emprecs Emp_Util.emprec_tab_t;
begin
  update employees_0 set salary = salary * 1.1
    where hire_date < = v_avg_hire_date
    returning

      employee_id,
      first_name,
      last_name,
      email,
      phone_number,
      hire_date,
      job_id,
      salary,
      commission_pct,
      manager_id,

      department_id
    bulk collect into v_emprecs;
  Emp_Util.Show_All ( v_emprecs );
end;
/
-- PL/SQL procedure successfully completed.
rollback /* prepare for repeat or for next sample */;
-- Rollback complete.