ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

What is the importance of purge clause in a drop table statement?

<p>Drop statement can have below two syntax. What is the difference between them.</p> <p>1. drop table &lt;table_name&gt; ;</p> <p>2. drop table &lt;table_name&gt; purge;</p> <p> </p>

user-image
تم إضافة السؤال من قبل Aby Punnoose , Senior Systems Engineer , Infosys Technologies Ltd
تاريخ النشر: 2015/01/10

Oracle Database10g introduces a new feature for dropping tables. When you drop a table, the database does not immediately release the space associated with the table. Rather, the database renames the table and places it in a recycle bin, where it can later be recovered with the FLASHBACK TABLE statement if you find that you dropped the table in error. If you want to immediately release the space associated with the table at the time you issue the DROP TABLE statement, then include the PURGE clause as follows. DROP TABLE employees PURGE; Specify PURGE only if you want to drop the table and release the space associated with it in a single step. If you specify PURGE, then the database does not place the table and its dependent objects into the recycle bin. NOTE: You cannot roll back a DROP TABLE statement with the PURGE clause, and you cannot recover the table if you drop it with the PURGE clause. This feature was not available in earlier releases.

el maattal mourad
من قبل el maattal mourad , RETAIL BANK - IT PROJECT MANAGER , Le Crédit Lyonnais (LCL)

1) This command deletes the table named table_name,

 

2) This command deletes the table table_name completely from the database

 

 

ADIL MUSTAFA
من قبل ADIL MUSTAFA , Senior System Engineer , Infosys Limited

purge is an additional clause you can use while dropping the table to remove the space taken by the table or related index in recycle bin.

you can use the below query to see the recyclebin details

select * from RECYCLEBIN;

 Hi,

As per my knowledge :

drop table <table_name> ; --> This command would drop the table but the said table could always be recovered as it would be residing in the recycle bin.

2. drop table <table_name> purge;

Using this command the table would be completely removed from the database and we would not be able to recover it from the Recycle bin. The said command would free up the space from the database.

Askar Ali
من قبل Askar Ali , Principal Consultant , Oracle Financial Software Services

Using purge option with drop table will drop the table and release the tablespace immediately. Table dropped using purge option,cannot be recovered.

Anwar Ahmed
من قبل Anwar Ahmed , IT Consultant , Mani Group L.L.C

Normally, a table is moved into the recycle bin (as of Oracle10g), if it is dropped. The table is unrecoverable (entirely) (dropped from the database) if purge syntax is used.

المزيد من الأسئلة المماثلة

هل تحتاج لمساعدة في كتابة سيرة ذاتية تحتوي على الكلمات الدلالية التي يبحث عنها أصحاب العمل؟