ORA-00984 is raised when a column name appears in a VALUES list or similar context where Oracle only permits literals, bind variables, or expressions.
ORA-00984: column not allowed here occurs when a column reference sneaks into a VALUES list, DEFAULT clause, or CHECK expression that demands literals. Replace the column with a literal, bind variable, or sub-query, or reposition it outside the VALUES list to fix the problem.
ORA-00984: column not allowed here
ORA-00984 is an Oracle syntax error that fires when a column name appears where only literal values, bind variables, or deterministic expressions are permitted. The parser stops at the offending column and returns the error immediately.
The issue commonly surfaces in INSERT … VALUES statements, DEFAULT clauses, CHECK constraints, and SELECT lists inside set operators.
Oracle considers these contexts value-only zones and rejects column references.
Oracle raises ORA-00984 when its SQL grammar rules detect a column token inside a VALUES list or similar construct.
The database engine expects constants that can be evaluated without referring to table rows.
The error can also arise from typos that turn a bind variable ( :column_val ) into a bare column name or from missing SELECT keywords inside sub-queries.
Identify the illegal column and decide whether you need its value from the current row or a literal. If you need the row value, move the INSERT to an INSERT … SELECT form.
If you intended a constant, replace the column with a literal or bind variable.
Always rerun the statement after changes.
Use EXPLAIN PLAN or autotrace to confirm that Oracle parses the SQL successfully.
INSERT … VALUES with computed column: convert to INSERT … SELECT.
Using a column as a DEFAULT: rewrite DEFAULT to a literal or a deterministic function.
CHECK constraint referencing another column: transform CHECK into a table-level constraint or trigger.
Validate SQL in a modern editor like Galaxy, which highlights illegal column references before execution.
Unit-test DDL scripts in a staging database and enable SQL Developer or Galaxy linting rules for INSERT statements.
Adopt parameterized INSERT patterns that always bind values.
Review peer code for VALUES lists exceeding five columns—these are prone to copy-paste column mistakes.
ORA-00936: missing expression—appears when the VALUES list is incomplete.
ORA-00927: missing equal sign—raised by malformed CHECK constraints that also often carry illegal columns.
ORA-06512: at line 1—generic PL/SQL wrapper error that can mask ORA-00984 inside dynamic SQL.
No. Oracle will not execute the statement until the illegal column reference is removed or relocated.
The rule has existed since Oracle7; all supported versions (11g–23c) behave the same.
Yes, if the intent was to supply a runtime value. They will not help if you truly need a column from another table—use INSERT … SELECT instead.
Galaxy’s syntax checker flags column misuse in VALUES lists in real time and suggests converting to INSERT … SELECT, preventing ORA-00984 before it hits production.