TRUNCATE TABLE in SQL With Example

.
SQL TRUNCATE TABLE - How To Truncate Table in SQL?

Truncate table in SQL with example

In SQL truncate Command is used to remove all data from the database but the structure of the table remains the same.
If you Want to remove the data from the existing table without Removing its structure use the Truncate Query in SQL


Syntax of Truncate table 

TRUNCATE TABLE  table_name; 


Example of Truncate Table 

TRUNCATE TABLE  Student; 

In the above TRUNCATE TABLE  Example, It Will Remove all the data from the Student table but the Structure of the Student Will Remain the Same.

Post a Comment

0 Comments