ORA-00913: too many values
The statement supplies more values than there are columns to receive them. Compare the column list with the VALUES list or the SELECT list, or the columns of a subquery with what the comparison expects.
What ORA-00913 means
Oracle matches values to columns by position, so both sides must have the same number of items. ORA-00913 means the right side has more. The opposite case is ORA-00947.
Common causes of ORA-00913
- An
INSERTwith more values than columns. INSERT INTO t SELECT * FROM swhere the source table has more columns.- A subquery returning two columns where one is expected, as in
WHERE id IN (SELECT id, name …). - A column that was dropped from the table while the code stayed the same.
How to fix ORA-00913
- Count the items on both sides.
- Always name the columns in
INSERT; never rely onSELECT *matching. - Make a subquery return exactly the columns the outer comparison uses.
- Check the current structure with
DESC table_name.
ORA-00913 example
Three values for two columns:
-- ORA-00913: too many values
INSERT INTO customers (id, name) VALUES (2, 'Acme', 3);
-- Works
INSERT INTO customers (id, name) VALUES (2, 'Acme');
In SQLlightspeed
When a statement fails, SQLlightspeed’s error panel shows the error code with a plain-language explanation and a suggestion for what to do next, together with Oracle’s own message and a link to Oracle’s documentation — for this error and dozens of other common ones.
Related errors
ORA-00947ORA-00904ORA-01427 All Oracle errors →
Oracle documentation for ORA-00913. Oracle is a registered trademark of Oracle Corporation. SQLlightspeed is not affiliated with Oracle.