Cook
Copy from CSV into Postgres table
- In psql, create a new table that matches the format of the csv headers
- In psql, run the COPY command:
COPY cars
FROM '/Users/kyletycholiz/Downloads/cars.csv'
DELIMITER ','
CSV HEADER;
note: if we don't want to have the table columns match the csv headers, we can specify like so:
COPY cars(id, name)
...