[英]Error when copying a csv file to a table using SQL Shell (psql)
I have a file test.csv with two lines:我有一个包含两行的文件 test.csv:
"smth", "1", "2", "3"
"smth more", "4", "5", "6"
I'm trying to copy it to a table with sql shell:我正在尝试将其复制到 sql shell 的表中:
CREATE TABLE test_table(col1 TEXT, col2 TEXT, col3 TEXT, col4 TEXT);
COPY test_table FROM 'E:\\PostgreSQL13\\scripts\\test.csv';
And get the following error:并得到以下错误:
wrong syntax for type integer: """"smth"", ""1"", ""2"", ""3""""
What could be the problem here?这里可能是什么问题?
Thank you!谢谢!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.