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



Truncate table Syntax-

TRUNCATE TABLE  table_name; 



Truncate table Example-

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 Remains the Same.

.

Post a Comment

0 Comments