This question already has an answer here:
- Delete all data in Postgres database 2 answers
Is there any SQL query to delete all rows from all tables in postgresql?
This question already has an answer here:
Is there any SQL query to delete all rows from all tables in postgresql? |
|||||
marked as duplicate by TypoCubeᵀᴹ Nov 3 at 19:22This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question. migrated from serverfault.com Nov 3 at 19:20This question came from our site for system and network administrators. |
|||||
|
Method 1: create a file with a set of sql-statements to truncate each table, then execute those statements from the file.
Method 2: create a database dump with schema only, recreate the database and restore the dump.
|
|||
|