l-lin
Archives Tags About me Resources
l-lin
Cancel
ArchivesTagsAbout meResources

PostgreSQL - Import / export CSV

l-lin included in post
 2020-04-15  23 words   One minute 
https://www.virtual-dba.com/media/postgresql-database-services-remote-dba.png

Export:

1
2
\copy (SELECT * FROM your_table)
TO '/tmp/your_table.csv' CSV HEADER FORCE QUOTE *;

Import:

1
\copy your_table FROM '/tmp/your_table.csv' CSV HEADER;
Updated on 2021-02-10  2c3a287
Read Markdown
 postgresql
Back | Home
Playing with Kafka Debug Java container
Powered by Hugo | Theme - LoveIt