PURGE
PURGE is an SQL keyword used to permanently erase a table or index from the database. It's typically executed after a DROP command to make certain that the target is no longer recoverable, freeing up disk space. The table space is immediately released back to the system. Unlike the DROP command, PURGE operation cannot be rolled back.
Example
Output
Explanation
The SQL statement DROP TABLE IF EXISTS employee PURGE;
will remove the ‘employee’ table from the database, and the PURGE
keyword will make sure to permanently remove it, bypassing the recycle bin.
Example
Output
Explanation
In the provided SQL statement, DROP TABLE employees PURGE;
indicates the removal of the ‘employees’ table. The PURGE
keyword in the DROP statement completely removes the table from the database, making recovery via the recycle bin impossible.