ORA-00955: name is already used by an existing object
ORA-00955: name is already used by an existing objectYou 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
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
CREATE TABLE orders (order_id NUMBER PRIMARY KEY, amount NUMBER);Table created.CREATE TABLE orders (order_id NUMBER PRIMARY KEY, amount NUMBER);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/SELECT object_name, object_type, created FROM user_objects WHERE object_name = 'ORDERS';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.
CREATE TABLE IF NOT EXISTS orders (order_id NUMBER PRIMARY KEY, amount NUMBER);
SELECT COUNT(*) AS cnt FROM user_objects WHERE object_name = 'ORDERS';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
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);Table created.
Table created.
Index created.CREATE INDEX idx_created_at ON refunds (created_at);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/SELECT index_name, table_name FROM user_indexes WHERE index_name = 'IDX_CREATED_AT';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.
CREATE INDEX idx_refunds_created_at ON refunds (created_at);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
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;Table created.
Table created.
1 row created.
1 row created.
Commit complete.CREATE OR REPLACE VIEW sales_summary AS SELECT yyyymm, SUM(amount) AS total FROM sales GROUP BY yyyymm;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/SELECT object_name, object_type FROM user_objects WHERE object_name = 'SALES_SUMMARY';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.
CREATE OR REPLACE VIEW sales_summary_v AS SELECT yyyymm, SUM(amount) AS total FROM sales GROUP BY yyyymm;
SELECT * FROM sales_summary_v;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