Oracle Database Data Definition Language(DDL Statements)- DROP Object Commands:
In this section, we will try to explain about important database DROP commands that are used by a data modeler by relating it with our example data.
DROP INDEX IND_SSN;
DROP SYNONYM SYN_EMPLOYEE_DTL;
DROP VIEW VIEW_EMPLOYEE_DTL;
DROP SEQUENCE SEQ_EMPLOYEE_DTL;
DROP TRIGGER TRG_SEQ_EMPLOYEE_DTL;
DROP TABLE EMPLOYEE_DTL;
Drop Table with Cascading Option:
In our example tables, try to drop tables GENDER_LKP, and DEPARTMENT_LKP after the data is loaded into GENDER_LKP, DEPARTMENT_LKP, and EMPLOYEE_DTL. You will get an error message. If you want to drop parent tables, that are connected with child tables, you can use the following command.
DROP TABLE GENDER_LKP CASCADE CONSTRAINTS;
DROP TABLE DEPARTMENT_LKP CASCADE CONSTRAINTS;