我将 csv 文件内容放入数据库中。当我在命令下手动运行时..它工作正常..但是当我在单个查询下方输入命令提示符时,它没有运行。
mysql -uuser -ppassword -hlocalhost -e "LOAD DATA INFILE "C:\csvfile.csv"
INTO TABLE test.LoadedEmployee FIELDS TERMINATED BY "," ENCLOSED BY ''
ESCAPED BY '\\' LINES TERMINATED BY "\n" STARTING BY ''"
仅供参考 .. 有效的手动语法:
mysql -uuser -ppassword -hlocalhost
LOAD DATA INFILE "C:\csvfile.csv" INTO TABLE test.LoadedEmployee
FIELDS TERMINATED BY "," ENCLOSED BY '' ESCAPED BY '\\'
LINES TERMINATED BY "\n" STARTING BY ''