Mysql
 sql >> Database >  >> RDS >> Mysql

Carica xml nella tabella MySQL con element

Rimuovere il punto e virgola dopo FIELDS TERMINATED ...

Dovresti usare LOAD XML ... Anche la sintassi. Vedi http://dev.mysql.com/doc/ refman/5.5/en/load-xml.html :

The LOAD XML statement reads data from an XML file into a table

Il tuo LOAD DATA INFILE ... viene utilizzato per caricare un file flat (csv) in una tabella, non in un XML:

The LOAD DATA INFILE statement reads rows from a text file into a table