简体   繁体   中英

Mysql import data contain commas with quotes

Hello i'm trying to import some data contain commas example

John,Locke,City of ,stars,87300 like you see City of ,stars there a comma on this column so added quotes "City of ,stars" after that i used mysqlimport

mysqlimport --ignore-lines=1 \\ --fields-terminated-by=, \\ --local -u root \\ -p Database \\ TableName.csv

in that case the column City of ,stars has added like 2 columns i want keep only 1

any help pls

您需要在命令行中添加fields-optionally-enclosed-by="\\""

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM