K
K
kott9ra2016-03-13 19:15:04
MySQL
kott9ra, 2016-03-13 19:15:04

Unique index?

Hello! There is a table in which 1 field has a unique index, but the problem is that the records are duplicated, i.e. as if the uniqueness of the field is being ignored.
field type VARCAHR 50

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Rsa97, 2016-03-13
@kott9ra

Are the entries duplicated? For VARCHAR, note that 'А' != 'A' (Russian and English) and 'A ' != 'A' (the space is not visible when viewing, but is taken into account when comparing).

D
DarkMatter, 2016-03-13
@darkmatter

Some kind of error, I think, is related to the type of the field. It will not let you put a unique index on a non-unique field, and vice versa, when there is already an index, it will not allow you to write to the field. Or the records are not really unique due to encoding or the like. Clear the table at first deliver an index, then enter the data.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question