Truncating a table

Truncate deletes the entire table contents, but leaves the structure intact.

Syntax

TRUNCATE TABLE table_name

Example

TRUNCATE TABLE foo;

Caution: This command deletes all table contents.

To delete the table entirely, see DROP.

  • 19
  • 27-Jul-2015
  • 673 Views