Informix Error -47093: Cannot create unique or primary key constraint with column type of BYTE or TEXT.
Cause and resolution
Cannot create unique or primary key constraint with column type of BYTE or TEXT.
In order to create a primary or unique constraint on the column, change the column data type from TEXT or BYTE, if permitted.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-47093 fires in the interactive ALTER TABLE menu when a unique or primary key
constraint is attempted on a BYTE/TEXT column — per the official guidance.
- The column's data type being
BYTEorTEXT, per the official guidance — the direct, only cause.
Solutions / Resolution
- Change the column's data type away from
TEXT/BYTE, if permitted, per the official guidance.
Examples
N/A
No specific triggering statement is documented beyond this menu-driven constraint restriction.
Diagnostic Checks
- Check the column's data type, and change it away from
BYTE/TEXTbefore adding a unique or primary key constraint.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -47093 in this set yet.
A unique/primary key constraint can't be created on a BYTE/TEXT column — change the
column's data type first.