postgres database

Truncate

Truncate table delete all rows in table, default not restart sequence. If want to restart sequence, adding RESTART IDENTITY

TRUNCATE TABLE table_name 
RESTART IDENTITY;

Truncate is faster than delete because it operate on table level instead of row level