RefLib

Reference library for AI

Back

postgresql_16:7.1.179.4 Examples

PostgreSQL 16 > Reference > SQL Commands > TRUNCATE > Examples

Truncate the tables bigtable and fattable: TRUNCATE bigtable, fattable;

The same, and also reset any associated sequence generators: TRUNCATE bigtable, fattable RESTART IDENTITY;

Truncate the table othertable, and cascade to any tables that reference othertable via foreign-key constraints: TRUNCATE othertable CASCADE;

Back