// Oracle error reference

ORA-01008: not all variables bound

The statement has a bind placeholder such as :id that was given no value, often because a colon in the SQL text was read as a placeholder.

Error code
ORA-01008
Category
Syntax and SQL statements
Error message
not all variables bound

What it means

Each placeholder like :id or :1 in a statement needs a value when it runs. ORA-01008 means at least one has none.

Newer releases name it: value for bind variable placeholder variable_name was not provided.

Common causes

  • Passing fewer values than there are placeholders, or binding by a different name.
  • A colon-prefixed word in the SQL, such as :new in a trigger body, that a client tool or driver treats as a bind placeholder.
  • Reusing the same placeholder name twice with a driver that binds by position.

How to fix it

  1. Match every placeholder with a value, by name or by position.

  2. In SQL*Plus or SQL Developer, declare and set the variable first.

    VARIABLE id NUMBER
    EXEC :id := 100
    SELECT * FROM hr.employees WHERE employee_id = :id;

Related errors

More syntax and sql statements errors

The code and message text are from the Oracle Database Error Help. Browse the full Oracle error list or search every database error.

// fewer errors, faster fixes

Work on Oracle in SQLly

A native SQL client for macOS, Windows and Linux with schema-aware IntelliSense, guardrails for risky statements and clear error messages, for Oracle and the other databases you use.