11. Import & Export Data
Import CSV file into Table
Example 1
COPY persons(first_name, last_name, dob, email)
FROM 'C:\sampledb\persons.csv'
DELIMITER ','
CSV HEADER;COPY 2Example 2
COPY sample_table_name
FROM 'C:\sampledb\sample_data.csv'
DELIMITER ','
CSV HEADER;Export PostgreSQL Table to CSV file
Last updated