ORA-22816 on INSERT with RETURN clause into a Version Enabled Table
(Doc ID 397765.1)
Last updated on MARCH 28, 2019
Applies to:
Oracle Database - Enterprise Edition - Version 10.2.0.1 to 11.2.0.1 [Release 10.2 to 11.2]Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Information in this document applies to any platform.
Symptoms
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);
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
y NUMBER;
z varchar2(20);
begin
insert into emp4(empno,ename) values(2222,'TEST2')
return empno, lower(ename) into y, z;
end;
/
y NUMBER;
z varchar2(20);
begin
insert into emp4(empno,ename) values(2222,'TEST2')
return empno, lower(ename) into y, z;
end;
/
4- execute that stored procedure, this will fail with : ORA-22816
exec testproc ;
begin
*
ERROR at line 1:
ORA-22816: unsupported feature with RETURNING clause
ORA-6512: at line 2
*
ERROR at line 1:
ORA-22816: unsupported feature with RETURNING clause
ORA-6512: at line 2
Cause
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
Symptoms |
Cause |
Solution |
References |