MySQL only imports a single row from CSV

前端 未结 1 1918
再見小時候
再見小時候 2021-02-09 01:08

Development machine is a Mac. I\'m having some trouble importing more than a single line from a CSV into Mysql. Here is my SQL statement:

LOAD DATA LOCAL INFILE          


        
相关标签:
1条回答
  • 2021-02-09 01:29

    Check the line endings:

    head -n2 sql.sql | hexdump -C
    

    but the most common problem, the line terminator isn't what you'd expect, try:

    LINES TERMINATED BY '\r'
    
    0 讨论(0)
提交回复
热议问题