8
This will delete all data in a table but unlike a DROP TABLE it will allow you to keep the table in your database. It deletes the rows but leaves all counters, such as a SERIAL, in place.
12
8
TRUNCATE TABLE table_name
14
10
TRUNCATE TABLE is typically faster than a DELETE * FROM TABLE query. An
16
12
row in the table, which could be quite large. TRUNCATE TABLE is the same
17
13
as DROP followed by CREATE except that the absence of the table between