1.

What is the importance of the TRUNCATE statement?

Answer»

TRUNCATE TABLE name_of_table statement REMOVES the data efficiently and quickly from the table.
The truncate statement can also be used to reset values of the identity columns along with data CLEANUP as shown below:

TRUNCATE TABLE name_of_table RESTART IDENTITY;

We can also USE the statement for removing data from multiple tables all at once by mentioning the table names separated by comma as shown below:

TRUNCATE TABLE table_1, table_2, table_3;


Discussion

No Comment Found