...

Database Managment - Oracle

Back to Course

Lesson Description


Lession - #1427 Oracle TRUNCATE TABLE


Oracle TRUNCATE TABLE

In Oracle, TRUNCATE TABLE explanation is utilized to eliminate all records from a table. It works same as DELETE proclamation yet without indicating a WHERE statement. It is for the most part utilized when you don?t need to stress over moving back
When a table is shortened, it can?t be moved back. The TRUNCATE TABLE assertion doesn't influence any of the table?s files, triggers or conditions.
Syntax

TRUNCATE TABLE [schema_name.]table_name   


Oracle TRUNCATE Table Example

Consider a table named "customers" and execute the following query to truncate this

TRUNCATE TABLE customers;  

Oracle DELETE Table Example


DELETE TABLE customers;  

TRUNCATE TABLE versus DELETE TABLE

Both the articulations will eliminate the information from the "clients" table yet the fundamental contrast is that you can move back the DELETE explanation while you can't move back the TRUNCATE TABLE proclamation.