Informix Error -681: Column specified more than once in the INSERT list.
Cause and resolution
Column specified more than once in the INSERT list.
The error occurs if the user specifies a column name more than once in the INSERT column list.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-681 fires when INSERT INTO table (col1, col2, ...)'s column list names the same column more
than once — per the official guidance, each column can appear at most once in the INSERT
column list.
- The same column name accidentally repeated in the
INSERTcolumn list — the direct, only cause. - A copy-pasted or generated column list that wasn't deduplicated before being used in the
INSERTstatement.
Solutions / Resolution
- Remove the duplicate column name from the
INSERTcolumn list, keeping only one instance. - Review the full column list carefully if the duplication isn't among the first few entries, since it can appear anywhere in a longer list.
Examples
The disallowed duplicate
INSERT INTO orders (order_id, status, order_id) VALUES (42, 'pending', 42);
-- -681: order_id listed twice
Corrected
INSERT INTO orders (order_id, status) VALUES (42, 'pending');
Diagnostic Checks
- Scan the
INSERTcolumn list for a repeated column name before running the statement.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -681 in this set yet.
A straightforward duplicate column in the INSERT list — scan for the repeated name.