Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

allow RETURNING clause via database link - ORA-22816

Sven W.Feb 22 2016 — edited Feb 22 2016

Currently the usage of the returning clause is not allowed via a database link.

If we try it we get

ORA-22816: unsupported feature with RETURNING clause

22816. 00000 -  "unsupported feature with RETURNING clause"

*Cause:    RETURNING clause is currently not supported for object type

           columns, LONG columns, remote tables, INSERT with subquery,

           and INSTEAD OF Triggers.

*Action:   Use separate select statement to get the values.

A typical use case is to insert ID columns using a sequence. To do such an insert remotely we must select from the sequence first, then do the insert using the fetched value.

This prevents the usage of identity columns in the remote database (ORA-32795: cannot insert into a generated always identity column).

Comments
Post Details
Added on Feb 22 2016
7 comments
10,959 views