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

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

You tried to create an object with a name that another object in the same schema already uses.

Lab-verifiedReproduced and fixed on Oracle AI Database 26ai Free 23.26.3.0.0 · 2026-11-15

Tables, views, indexes, sequences and procedures in one schema share the same namespace. If any object already has the name, CREATE stops with ORA-00955, even when the existing object is a different type.

First find what owns the name: SELECT object_name, object_type FROM user_objects WHERE object_name = 'NAME'; (names are stored in upper case).

Causes and fixes

  1. Running the same CREATE TABLE script twice
  2. The index name is already used on another table
  3. CREATE OR REPLACE VIEW on a name that is a table

1Running the same CREATE TABLE script twice

The second CREATE TABLE orders (...) failed with ORA-00955. user_objects showed ORDERS was already there as a TABLE, created by the first run.

23ai has CREATE TABLE IF NOT EXISTS. Run against the existing table, it printed Table created. without an error, and user_objects still had 1 object named ORDERS: the existing table was left as it was.

Setup
Setuprun as lab_a
CREATE TABLE orders (order_id NUMBER PRIMARY KEY, amount NUMBER);
OUTPUT
Table created.
Reproducerun as lab_a
CREATE TABLE orders (order_id NUMBER PRIMARY KEY, amount NUMBER);
OUTPUT
CREATE TABLE orders (order_id NUMBER PRIMARY KEY, amount NUMBER)
             *
ERROR at line 1:
ORA-00955: name is already used by an existing object
Help: https://docs.oracle.com/error-help/db/ora-00955/
Checkrun as lab_a
SELECT object_name, object_type, created FROM user_objects WHERE object_name = 'ORDERS';
OUTPUT
OBJECT_NAME                    OBJECT_TYPE                    CREATED
------------------------------ ------------------------------ ------------------
ORDERS                         TABLE                          15-NOV-26

1 row selected.

IF NOT EXISTS does not compare columns. If the existing table has a different structure, it is still kept as is.

After the fixrun as lab_a
CREATE TABLE IF NOT EXISTS orders (order_id NUMBER PRIMARY KEY, amount NUMBER);
SELECT COUNT(*) AS cnt FROM user_objects WHERE object_name = 'ORDERS';
OUTPUT
Table created.


       CNT
----------
         1

1 row selected.

2The index name is already used on another table

idx_created_at existed on orders, so CREATE INDEX idx_created_at ON refunds (created_at) failed. Index names must be unique in the schema, not just per table. user_indexes showed IDX_CREATED_AT belonged to ORDERS.

Naming the index after its table, idx_refunds_created_at, worked (Index created.).

Setup
Setuprun as lab_a
CREATE TABLE orders (order_id NUMBER, created_at DATE);
CREATE TABLE refunds (refund_id NUMBER, created_at DATE);
CREATE INDEX idx_created_at ON orders (created_at);
OUTPUT
Table created.


Table created.


Index created.
Reproducerun as lab_a
CREATE INDEX idx_created_at ON refunds (created_at);
OUTPUT
CREATE INDEX idx_created_at ON refunds (created_at)
             *
ERROR at line 1:
ORA-00955: name is already used by an existing object
Help: https://docs.oracle.com/error-help/db/ora-00955/
Checkrun as lab_a
SELECT index_name, table_name FROM user_indexes WHERE index_name = 'IDX_CREATED_AT';
OUTPUT
INDEX_NAME                     TABLE_NAME
------------------------------ ------------------------------
IDX_CREATED_AT                 ORDERS

1 row selected.

Putting the table name in index names avoids this when the same column exists in several tables.

After the fixrun as lab_a
CREATE INDEX idx_refunds_created_at ON refunds (created_at);
OUTPUT
Index created.

3CREATE OR REPLACE VIEW on a name that is a table

CREATE OR REPLACE VIEW sales_summary AS ... failed because sales_summary was a TABLE (user_objects showed TABLE). OR REPLACE only replaces an existing view; it never drops a table.

Creating the view under a different name, sales_summary_v, worked and returned 202611 / 150.

Setup
Setuprun as lab_a
CREATE TABLE sales_summary (yyyymm VARCHAR2(6), total NUMBER);
CREATE TABLE sales (yyyymm VARCHAR2(6), amount NUMBER);
INSERT INTO sales VALUES ('202611', 100);
INSERT INTO sales VALUES ('202611', 50);
COMMIT;
OUTPUT
Table created.


Table created.


1 row created.


1 row created.


Commit complete.
Reproducerun as lab_a
CREATE OR REPLACE VIEW sales_summary AS SELECT yyyymm, SUM(amount) AS total FROM sales GROUP BY yyyymm;
OUTPUT
CREATE OR REPLACE VIEW sales_summary AS SELECT yyyymm, SUM(amount) AS total FROM sales GROUP BY yyyymm
                                                                                 *
ERROR at line 1:
ORA-00955: name is already used by an existing object
Help: https://docs.oracle.com/error-help/db/ora-00955/
Checkrun as lab_a
SELECT object_name, object_type FROM user_objects WHERE object_name = 'SALES_SUMMARY';
OUTPUT
OBJECT_NAME                    OBJECT_TYPE
------------------------------ ------------------------------
SALES_SUMMARY                  TABLE

1 row selected.

If the table is really no longer needed, it must be dropped on purpose before the view can take its name.

After the fixrun as lab_a
CREATE OR REPLACE VIEW sales_summary_v AS SELECT yyyymm, SUM(amount) AS total FROM sales GROUP BY yyyymm;
SELECT * FROM sales_summary_v;
OUTPUT
View created.


YYYYMM      TOTAL
------ ----------
202611        150

1 row selected.

FAQ

What does ORA-00955 name is already used by an existing object mean?

Some object in your schema (table, view, index, sequence, etc.) already has that name. Different object types still can't share a name.

How do I find which object is using the name?

Run SELECT object_name, object_type FROM user_objects WHERE object_name = 'ORDERS'; with the name in upper case.

Is there CREATE TABLE IF NOT EXISTS in Oracle?

Yes, in 23ai. When the table already exists, it finishes without error and leaves the existing table unchanged.

Why does CREATE INDEX give ORA-00955 on a different table?

Index names are unique in the whole schema. Another table already has an index with that name; check user_indexes.

How we verify

Each scenario starts from fresh database users. A script runs the setup, confirms the exact error code, applies the fix and runs the statement again. The output shown is what the database printed, saved by the script.

lab_a and lab_b are ordinary users created for the test; system is the DBA account. Oracle AI Database 26ai Free Release 23.26.3.0.0 - Develop, Learn, and Run for Free

Related errors