In this article we will explain how to remove all record from the table in SQL Server with example.
The SQL truncate table command is used to remove all rows (complete data) from a table. It is similar to delete statement, delete statement can use where clause but truncate statement cannot use where clause.
Let's see the syntax to truncate the table from the database.
TRUNCATE TABLE table_name;
For example, you can write following statement to truncate the data of student table.
truncate table Student
Note:- SQL Truncate table command remove all rows (complete data) from a table and Reset identity columns but delete table command also remove all rows (complete data) from a table but delete table command dose not reset identity column.
I hope this article will help to you.