Hi,
when i imort data from csv to table ,there may be some error
create table t(d1 text not null,d2 text not null,d3 text not null);
\copy t(d1,d2,d3) from 'comma.text' with delimiter ',';
ERROR: missing data for column "d2"
CONTEXT: COPY t, line 1: "a;b;c"
\copy t(d1,d2,d3) from 'semicolon.text' with delimiter ';' ;
--no error
cat comma.text
a,b,c
e,,f
cat semicolon.text
a;b;c
e;;f
来自网易手机号码邮箱了解更多