Example - Emptying a Table v13
The example that follows removes the data from the sales
table. Use the following command to create the sales
table:
Populate the sales
table with the command:
Querying the sales
table shows that the partitions are populated with data.
To delete the contents of the sales
table, invoke the following command:
Now, querying the sales
table shows that the data has been removed but the structure is intact.
For more information about the TRUNCATE TABLE
command, see the PostgreSQL documentation at:
https://www.postgresql.org/docs/current/static/sql-truncate.html