truncate command in postgresql code example
Example 1: truncate table postgres
TRUNCATE TABLE table_name;
Example 2: truncate table postgres
truncate my_table restart identity
Example 3: postgres clear table
TRUNCATE [ TABLE ] [ ONLY ] name [ * ] [, ... ]
[ RESTART IDENTITY | CONTINUE IDENTITY ] [ CASCADE | RESTRICT ]