Using SQL to remove all the Data from a Database Table

An easy way to remove all the data from an existing database table is through the use of an SQL (Structured Query Language) query. To execute SQL queries you will need to use the SQL query editor of your chosen database. For SQL server, use the Management studio to create a new query by right clicking on the database and selecting New Query.

To remove all the data from a table you must specify the table name after the truncate table command. An example of this is below.

SQL Script:


Return to all articles