PostgreSQL · Command
TRUNCATE
TRUNCATE removes all rows from one or more PostgreSQL tables without scanning them. It immediately reclaims table space and can reset owned sequences or include foreign-key-dependent tables.
Last updated
Syntax
TRUNCATE [ TABLE ] [ ONLY ] name [ * ] [, ... ] [ RESTART IDENTITY | CONTINUE IDENTITY ] [ CASCADE | RESTRICT ]In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
DELETEVACUUMALTER SEQUENCEON TRUNCATE triggersforeign keys