zipperer / migrate_database_with_michael

0 stars 0 forks source link

Copy data into table in postgres from CSV #16

Closed zipperer closed 7 months ago

zipperer commented 7 months ago

Follow steps from postgres_script.txt

== example copy data into table in postgres ==
open names_and_numbers.csv.
put in file:
george,3
john,2
helen,9
$ psql --username example_user --dbname postgres
psql> \copy my_table(name, phone_number) FROM '/names_and_numbers.csv' WITH (FORMAT CSV, DELIMITER ',');
zipperer commented 7 months ago

We did steps like this during #2 .