Answers for "export psql result to csv"

SQL
1

export psql result to csv

-- Client side -This approach does the file handling on the client side
\Copy (Select * From foo) To '/tmp/test.csv' With CSV DELIMITER ',' HEADER

-- Server side - This approach runs entirely on the remote server
Copy (Select * From foo) To '/tmp/test.csv' With CSV DELIMITER ',' HEADER;
Posted by: Guest on April-21-2022

Code answers related to "SQL"

Browse Popular Code Answers by Language