Quantcast
Viewing all articles
Browse latest Browse all 3724

Loading a file into MYSQL table error code 1062 Duplicate entry for primary key (no replies)

The table is empty before load statement is executed
do a select * from code_protocol;
only entry is line with null values for all columns/fields

To test the error I created from excel by saving a comma delimited *.csv file

The csv file has only one entry/row and I am only loading primary key and one other column.

load data infile 'c:/wamp64/tmp/code_protocol1.csv'
into table code_protocol
FIELDS terminated by ','
enclosed by '"'
lines terminated by '\r\n'
ignore 1 rows
(protocol_id, protocol_disc
);

what am I doing wrong?

Viewing all articles
Browse latest Browse all 3724

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>