ORA-00947 means a statement supplies fewer values than the columns it fills. In an INSERT, the VALUES list or the SELECT has fewer items than the column list, or than the table has columns when no list is given. The fix is to name only the columns you are filling, or to supply a value for each one.
Reproduce the Error
Example:
create table demo_staff (staff_id number, name varchar2(30), hired date); insert into demo_staff values (1, 'Mia'); insert into demo_staff (staff_id, name, hired) values (1, 'Mia'); insert into demo_staff (staff_id, name, hired) select 1, 'Mia' from dual;
Output:
Table DEMO_STAFF created. Error starting at line : 2 In command - insert into demo_staff values (1, 'Mia') Error at Command Line : 2 Column : 13 Error report - SQL Error: ORA-00947: not enough values Error starting at line : 3 In command - insert into demo_staff (staff_id, name, hired) values (1, 'Mia') Error at Command Line : 3 Column : 48 Error report - SQL Error: ORA-00947: not enough values Error starting at line : 4 In command - insert into demo_staff (staff_id, name, hired) select 1, 'Mia' from dual Error at Command Line : 4 Column : 13 Error report - SQL Error: ORA-00947: not enough values
- Without a column list, the INSERT needs a value for all three columns of the table.
- With a column list of three, the VALUES list needs three values.
- INSERT ... SELECT needs as many select-list items as listed columns.
Fix: Match the Lists
Example:
insert into demo_staff (staff_id, name) values (1, 'Mia'); -- list only what you have insert into demo_staff (staff_id, name, hired) values (2, 'Leo', date '2026-01-15'); select * from demo_staff order by staff_id;
Output:
1 row inserted.
1 row inserted.
STAFF_ID NAME HIRED
___________ _______ ______________
1 Mia
2 Leo 15-JAN-2026Columns left out of the list get their default value, or NULL.
Things to Know
- Always list the columns in INSERT statements; an INSERT without a list breaks as soon as a column is added to the table.
- The opposite mistake, more values than columns, raises ORA-00913: too many values.
- Comparing a column list with a subquery, as in (a, b) IN (SELECT ...), needs the same number of items on both sides too.
Related Guides
Conclusion
ORA-00947 means fewer values than columns. List the columns you fill, give each a value, and let the others take their defaults.
