I happen to be trying to delete the following table of name CITY with the following code:
DROP TABLE CIUDAD;
But when I run the code I get the following error:
ORA-02449: unique/primary keys in table referenced by foreign keys
02449. 00000 - "unique/primary keys in table referenced by foreign keys"
*Cause: An attempt was made to drop a table with unique or
primary keys referenced by foreign keys in another table.
*Action: Before performing the above operations the table, drop the
foreign key constraints in other tables. You can see what
constraints are referencing a table by issuing the following
command:
SELECT * FROM USER_CONSTRAINTS WHERE TABLE_NAME = "tabnam";
THE CITY TABLE IS THE FOLLOWING:
CREATE TABLE CIUDAD(
COD_CIUDAD NUMBER CONSTRAINT PK_CIUDAD PRIMARY KEY,
NOMBRE_CIUDAD VARCHAR2(20) CONSTRAINT NOTNULL_NOMBRE_CIUDAD NOT NULL,
NOMBRE_REGION VARCHAR2(20) CONSTRAINT NOTNULL_NOMBRE_REGION NOT NULL
);
I deleted all the tables with which it is related and still I can not delete it.
any help I would appreciate it.
Greetings.