// Oracle error reference

ORA-00955: name is already used by an existing object

A CREATE statement used a name that another object in the same schema already has: a table, view, sequence, synonym or index with that name.

Error code
ORA-00955
Category
Names and objects
Error message
name is already used by an existing object

What it means

Tables, views, sequences, private synonyms, procedures and other schema objects share one namespace per schema, so you can't have a view and a table with the same name. ORA-00955 is raised when CREATE would reuse a taken name. Indexes and constraints have their own namespaces, but an index can still clash with another index.

Common causes

  • Running a creation script a second time.
  • A different kind of object (a view or synonym) already has the name.
  • Creating an index whose name is already used by another index in the schema.

How to fix it

  1. Find what already has the name.

    SELECT object_name, object_type FROM user_objects WHERE object_name = 'ORDERS';
  2. Use CREATE OR REPLACE for views, procedures, functions, packages, triggers and synonyms.

    CREATE OR REPLACE VIEW active_orders AS
    SELECT * FROM orders WHERE status = 'OPEN';
  3. On Oracle 23ai and later, use IF NOT EXISTS to make table creation repeatable; on older releases, drop the object first or check user_objects before creating.

    CREATE TABLE IF NOT EXISTS orders (id NUMBER PRIMARY KEY);

Related errors

More names and objects 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.