MySql Truncate Table

MySQL TRUNCATE TABLE

The MySQL TRUNCATE TABLE statement allows you to delete all data in a table. Therefore it is like a DELETE statement without a WHERE clause. However in some cases, the MySQL TRUNCATE TABLE statement is more efficient than the DELETE statement.

Syntax

TRUNCATE TABLE table_name

use the TRUNCATE TABLE statement to see how fast it performs in comparison with the DELETE statement.

TRUNCATE TABLE emp;

Admin has written 171 articles