In Oracle, TRUNCATE TABLE statement is used to remove all records from a table. It works same as DELETE statement but without specifying a WHERE clause. It is generally used when you don?t have to worry about rolling back
Once a table is truncated, it can?t be rolled back. The TRUNCATE TABLE statement does not affect any of the table?s indexes, triggers or dependencies.
TRUNCATE TABLE [schema_name.]table_name
1) schema_name: This parameter specifies the name of the schema that the table belongs to. It is optional.
2) table_name: It specifies the table that you want to truncate.
Consider a table named "customers" and execute the following query to truncate this
TRUNCATE TABLE customers;
Now check the customers table, you will find that there is no data available in that table. It is equally similar to DELETE TABLE statement in Oracle.
DELETE TABLE customers;
Both the statements will remove the data from the "customers" table but the main difference is that you can roll back the DELETE statement whereas you can't roll back the TRUNCATE TABLE statement.