×
☰ See All Chapters

 Drop statement for removing database tables in Oracle

DROP TABLE statement is used to remove or delete a table from the Oracle database.

Syntax to drop table in Oracle:

DROP TABLE <table-name>  [ restrict / cascade ];

 

  1. Using [ restrict | cascade ] is optional 

  2. When the RESTRICT option is used and the table is referenced by a view or constraint, the DROP statement returns an error.  

  3. When the CASCADE option is used, then drop succeeds and all referencing views and constraints are dropped. 

  4. SQL Server does not allow for the use of the CASCADE option. So for that particular implementation, you must ensure that you drop all objects that reference the table you are removing to ensure that you are not leaving an invalid object in your system. 

 

 


All Chapters
Author