PostgreSQL Export table into CSV file

To export a table into CSV file, run

\copy TABLE_NAME to 'FILE_NAME.csv' csv header;

This will save the CSV file in current directory.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *