Technology Insights

Delete All Rows from a PostgreSQL Table

Use the truncate command from the CLI or via PGAdmin to delete all rows from a PostgreSQL database. To use PGAdmin follow the directions hereĀ or follow the directions below to truncate the table from the CLI. Connect: Connect to PostgreSQL with psql. Delete Rows: Type the following from the CLI. bash dev=# truncate table <em>table_name</em>…