SQL · Writing data
truncate
Removes every row quickly and resets identity in PostgreSQL. It cannot be easily rolled back selectively.
Syntax
truncate table nameExample
Open in the lab
Notes
TRUNCATE is not available in SQLite; use DELETE FROM without a WHERE clause.
More in this group
Learn this in the course
Reference pages are the quick answer. The course explains the why, shows the full example and ends with a challenge.