resulta que me encuentro intentando eliminar la siguiente tabla de nombre CIUDAD con el siguiente código:
DROP TABLE CIUDAD;
Pero al ejecutar el código me aparece el siguiente 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";
LA TABLA CIUDAD ES LA SIGUIENTE:
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
);
Borré todas las tablas con las que se relaciona y aún así no puedo la puedo eliminar.
cualquier ayuda la agradecería.
Saludos.