My Oracle Support Banner

ORA-22816 on INSERT with RETURN clause into a Version Enabled Table (Doc ID 397765.1)

Last updated on AUGUST 04, 2018

Applies to:

Oracle Server - Enterprise Edition - Version: to - Release: 10.2 to 11.2
Information in this document applies to any platform.


Problem Statement
Insert into a Version Enabled Table fails with:
ORA-22816: unsupported feature with RETURNING clause

Steps To Reproduce:

1- Create Table with PK column

create table emp4(empno number, ename varchar2(20));
alter table emp4 add primary key(empno);

2- Version Enabled the table by executing the following

exec DBMS_WM.EnableVersioning('emp4');


3- Create a stored procedure to INSERT into that Table with Return clause

create or replace procedure testproc as
z varchar2(20);
 insert into emp4(empno,ename) values(2222,'TEST2')
 return empno, lower(ename) into y, z;

4- execute that stored procedure, this will fail with : ORA-22816

exec testproc ;

ERROR at line 1:
ORA-22816: unsupported feature with RETURNING clause
ORA-6512: at line 2


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.