Frage

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!

War es hilfreich?

Lösung

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.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top