Informix Error -26195: No constraints can be defined for external tables.
Cause and resolution
No constraints can be defined for external tables.
The CREATE EXTERNAL TABLE statement contains one or more types of constraint that are not allowed.
Check the statement for primary-key, referential, or unique constraints on a column or for the table.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-26195 fires when CREATE EXTERNAL TABLE or a related statement attempts to define a
constraint on an external table — per the official guidance.
- A
PRIMARY KEY,FOREIGN KEY,UNIQUE,CHECK, or other constraint was specified for an external table, per the official guidance — the direct, only cause; external tables can't carry any constraints.
Solutions / Resolution
- Remove all constraint definitions from the external table declaration, per the official guidance.
- If constraint enforcement is required, load the data into a regular table and define constraints there instead.
Examples
N/A
No specific triggering statement is documented beyond declaring a constraint on an external table.
Diagnostic Checks
- Check the
CREATE EXTERNAL TABLEstatement for any constraint clauses, and remove them.
Related Errors / Related Topics
- -26191 — "Incorrect use of an external table tablename in query." Also concerns operations disallowed on external tables.
A constraint was defined on an external table, which isn't allowed — remove the constraint, or use a regular table if constraint enforcement is needed.