GNU/Linux Desktop Survival Guide
by Graham Williams |
|||||
PostgrSQL CSV Import |
20201127 We can populate a table from a csv file.
kayon=# COPY iris FROM '/home/kayon/iris.csv' WITH (FORMAT csv, HEADER true); COPY 150 |
If only specific columns are available in the csv file:
kayon=# COPY iris (sepal_length, species) FROM '/home/kayon/iris.csv' WITH (FORMAT csv, HEADER true); COPY 150 |