Question

I am using MySQL Workbench 6.0 and importing a reasonably large (~55MB) .csv file. The first column consists of reference IDs and the second is dates. The reference IDs read in fine for the first day but when it comes to the second day (when the reference IDs should start to repeat) the information starts to become garbled, though the dates remain correct.

It is also worth noting that I did not have the UN box ticked when I made the table.

I am wondering what is going on here and whether anyone could help me.

Thanks!

Was it helpful?

Solution

A primary key is by definition unique. That's basically all: you cannot have a non-unique primary key, so if you have defined it as primary key, you cannot have repeating values.

solutions: make it a non-primary key / index, or add some uniqueness by making it a combined primary key with the date.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top