SQL SERVER

Truncate Table in SQL Server

In SQL Server by Baqir AliLeave a Comment

What is Truncate Command in SQL SERVER?

TRUNCATE Commands deletes all data from a table. The TRUNCATE command is similar to the DELETE command but it is like dropping a table and recreating it again.

After using the TRUNCATE command all auto-increment values are reset and will begin from the beginning.

Using Truncate Command in SQL SERVER

TRUNCATE table WareHouse

The above command deletes all data from the table WareHouse.

Drop-Table in SQL SERVER

DROP table WareHouse

The Command deletes the table schema as well as data. If you needed that table you need to re-create that table.

Support us by sharing this post

About the Author

Baqir Ali

Facebook Twitter

Hi, I am Baqir Ali ---- Blogger, Programmer, and a Teacher. I am currently working as a Programmer for Softnat Technologies. I have tons of ideas and data to share with you all via blogging.

Leave a Comment