empty sql table code example
Example 1: query to empty table data in sql server
TRUNCATE TABLE table_name;
Example 2: empty an sql table
TRUNCATE TABLE table_name;
Example 3: sql empty table
-- Quick, no possible rollback
TRUNCATE TABLE my_table;
-- With possible rollback
DELETE FROM my_table;
COMMIT; -- or ROLLBACK;
Example 4: delete all records from table
DELETE FROM table_name;