MySQL TRUNCATE Table

MYSQL TRUNCATE statement removes the complete data without removing its structure.

The TRUNCATE TABLE statement is used when you want to delete the complete data from a table without removing the table structure.

Syntax:

snippet
TRUNCATE TABLE  table_name;

Example:

This example specifies how to truncate a table. In this example, we truncate the table "cus_tbl".

snippet
TRUNCATE TABLE  cus_tbl;

Output:

mysql truncate table 1

See the table:

snippet
SELECT* FROM cus_tbl;

Output:

mysql truncate table 2
Related Tutorial
Follow Us
https://www.facebook.com/Rookie-Nerd-638990322793530 https://twitter.com/RookieNerdTutor https://plus.google.com/b/117136517396468545840 #
Contents