Informix Error -11057: Column already exists.
Cause and resolution
Column already exists.
This Informix CLI error code is the same as SQLSTATE value S0021. The following functions can return this error code: SQLExecDirect() and SQLPrepare().
The SQL statement contained an ALTER TABLE statement, but the column name specified in the ADD clause is not unique or identifies a column that already exists. Use column names that do not exist already.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-11057 fires when an ALTER TABLE ... ADD clause names a column that isn't unique or
already exists — per the official guidance, this is the same as SQLSTATE value S0021,
returnable by SQLExecDirect() and SQLPrepare().
- An
ALTER TABLE ADDcolumn name that's already in use on the table, per the official guidance — the direct, only cause.
Solutions / Resolution
- Use column names that don't already exist, per the official guidance.
Examples
N/A
No specific triggering statement is documented beyond a duplicate column name.
Diagnostic Checks
- Check the table's existing column names before issuing the ALTER TABLE ADD statement.
Related Errors / Related Topics
- -11058 — "Column not found." The mirror-image error — a column name that doesn't exist where one is expected, rather than a name that already does.
An ALTER TABLE ADD named a column that already exists on the table — use a unique name.