Join the SingleStore Community Today
Get expert advice, develop skills, and connect with others.
Removes all rows from the table.
TRUNCATE is equivalent to running a
DELETE which removes all the rows from the table but without all the overhead of deleting one row at a time.
TRUNCATE [TABLE] tbl_name
TRUNCATEoperation is run the
TRUNCATEwill block and wait for it to finish. This is the same locking that an
ALTERoperation does before running.
mysql> TRUNCATE TABLE mytbl; Query OK, 1 row affected (6.32 sec)