From the course: Learning Oracle Database 19c

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Drop a table

Drop a table - Oracle Database Tutorial

From the course: Learning Oracle Database 19c

Start my 1-month free trial

Drop a table

- [Instructor] Disk space is not unlimited, so if you don't need a table any longer, you can drop it. You can drop it permanently or you can retrieve it from the database's recycle bin if the database is configured with a recycle bin and the correct settings. In this lesson, I'll go over the basics of how to drop a table, how to get back a table you accidentally dropped, and the kinds of errors you might see when a table is not droppable for one of several reasons. Here is the syntax of the DROP TABLE command. You specify the name of the table and optionally the name of the table's schema if it's not in your schema. if other tables are using the table to be dropped for referential integrity purposes, in other words, a foreign key constraint, you'll have to add the CASCADE CONSTRAINTS clause to drop the constraint from all tables of referencing the table being dropped. Finally, you can add the PURGE keyword if you want to free up space occupied by the table on disk. As you'll see later…

Contents