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:
DROP INDEX IND_SSN;
Drop Synonym:
DROP SYNONYM SYN_EMPLOYEE_DTL;
Drop View:
DROP VIEW VIEW_EMPLOYEE_DTL;
Drop Sequence:
DROP SEQUENCE SEQ_EMPLOYEE_DTL;
Drop Trigger:
DROP TRIGGER TRG_SEQ_EMPLOYEE_DTL;
Drop Table:
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;