My Oracle Support Banner

ORA-22816 When Loading Data Into a View With CLOB Column and an INSTEAD OF Trigger (Doc ID 795956.1)

Last updated on MARCH 04, 2019

Applies to:

Oracle Database - Enterprise Edition - Version to [Release 8.1.7 to 11.1]
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.
This problem can occur on any platform.

NOTE: In the testcase content below, the user information and metadata used represents fictitious data. Any similarity to actual persons, living or dead, is purely coincidental and not intended in any manner.


You try to load data using SQL*Loader into a view with a LOB that has an instead of trigger. This ends with error message:

Record 1: Rejected - Error on table TEST_CLOB_LOAD_VW, column ID1.
ORA-22816: unsupported feature with RETURNING clause

The next test demonstrates this:

create sequence test_clob_seq start with 1;

create table test_clob
   id1 number not null,
   c1  clob   not null

create view test_clob_load_vw as
select id1, c1
from   test_clob;

create or replace trigger test_clob_load_trig
instead of insert on test_clob_load_vw
for each row
   insert into test_clob (id1, c1) values (:new.id1, :new.c1);

The control file prepared for SQL*Loader is:

load data
infile *
into table test_clob_load_vw
fields terminated by ',' optionally enclosed by '"'
   id1 expression "test_clob_seq.nextval",
   c1  char(10000)
"this is a test to show that the instead of trigger breaks with clobs and sqlldr"




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.