How do I clear a table?

×

Fastest way to clear a table is with the following query:

TRUNCATE TABLE TableName

Where TableName is the table you are clearing

For example, If you want to clear the Customers table, use the following query:

TRUNCATE TABLE Customers

In some cases, the table may have Foreign Keys and TRUNCATE won't work. In that case, use the following query:

DELETE FROM TableName