Mastering MySQL 4 [Electronic resources]

Ian Gilfillan

نسخه متنی -صفحه : 229/ 152
نمايش فراداده

TRUNCATE

TRUNCATE TABLE table_name

The TRUNCATE statement deletes all records from a table. It is quicker than the equivalent DELETE statement as it DROPs and CREATEs the table. It is not transaction safe (so will return an error if there are any active transactions or locks).