How to fix the Oracle error ORA-02440: Create as select with referential constraints not allowed?

In this post, you’ll learn more about the Oracle ErrorORA-02440: Create as select with referential constraints not allowed with the details on why you receive this error and the possible solution to fix it.

Oracle Error Description

ORA-02440: Create as select with referential constraints not allowed

Reason for the Error ORA-02440: Create as select with referential constraints not allowed

create table foo (… ref. con. …) as select …;

How to fix the Error ORA-02440: Create as select with referential constraints not allowed ?

You can fix this error in Oracle by following the below steps

Create the table as select, then alter the table to add the constraints afterwards.

Tags :

Leave Your Comment