The correct COPY command to load postgreSQL data from csv file that has single-quoted data?

后端 未结 3 972
名媛妹妹
名媛妹妹 2021-02-13 03:24

I have csv file that has contents like this:

10,53073,0,0,\'Y\',\'2008-05-30 21:46:55\',0,\'2008-05-30 21:48:04\',0,53071,2

I want to load the

3条回答
  •  野的像风
    2021-02-13 04:24

    Never mind, I got the answer:

    COPY my_table FROM 'c:\downloads\file.csv' DELIMITERS ',' CSV QUOTE '''';
    

提交回复
热议问题