[英]How can I import my csv file in to postgres?
1) I tried to import csv file by right clicking on 'column' name, then select import and my csv file, but when I query I cant see anything. 1)我尝试通过右键单击“列”名称来导入 csv 文件,然后选择导入和我的 csv 文件,但是当我查询时我什么也看不到。
2) Then I tried second way to import csv as in the pic by copying. 2)然后我尝试了第二种方法通过复制来导入图片中的csv。 it gives an error saying the table doesnt exist.它给出了一个错误,说该表不存在。
Okay I changed the database, but it still doesnt work好的,我更改了数据库,但它仍然无法正常工作
This worked well for me.这对我来说效果很好。 I hope it does for you too.我希望它也适合你。
COPY your_db_in_which_you_are_importing, FROM 'ABSOLUTE_PATH_OF_CSV_FILE/abc.csv' DELIMITER ',' CSV;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.