How To Use TRUNCATE TABLE Statement In SQL

In this article, we will learn how to use the TRUNCATE TABLE statement in SQL.

To delete the data inside a table, but not the table itself, the TRUNCATE TABLE statement is used.

Syntax

TRUNCATE TABLE TABLE_NAME;

Example

The subsequent statement would delete the data from the “Article” table, but not the table itself:

TRUNCATE TABLE Article;

 

Also, check How To Delete/Drop Table Using Query In SQL

Submit a Comment

Your email address will not be published. Required fields are marked *

Subscribe

Select Categories