SQL Keyword - TRUNCATE

TRUNCATE Keyword

A Table's values are deleted with the TRUNCATE TABLE command, but not the table itself.

You can also use the DROP TABLE command to completely remove a table from the database, but doing so would need you to recreate the table in order to continue storing data.

With the truncate command, all data from a database is swiftly removed, generally getting across several integrity checking mechanisms.

Syntax

TRUNCATE TABLE <TABLE_NAME>;

Example

TRUNCATE TABLE Employee;

Summary

The TRUNCATE TABLE command deletes the data inside a table, but not the table itself.