I am trying to upload a csv to a MySql database but the following code is not working. I am entering the query directly into MySql.
Create table testing.test (
test VARCHAR(50),
test2 VARCHAR(50),
primary key (test));
LOAD DATA LOCAL INFILE 'C:/test.csv'
INTO TABLE testing.test
FIELDS
TERMINATED BY ','
LINES TERMINATED BY '\r\n';
Basically it deletes all rows but the final row of the table. It produces the following message: "7 row(s) affected Records: 8 deleted: 0 Skipped". Any ideas why the rows are being deleted?
'\n'. Thanks!