Reputation: 5709
I just stumbled over the fact that MySQL allows duplicate enum values.
Like in en enum('a','a','b','c') NOT NULL)
Why?
Upvotes: 0
Views: 2970
Reputation: 11749
Its because the way MYSQL actually handles ENUM is by INDEX.
So to MYSQL....
('a','a','b','c')
Actually equals
(0,1,2,3)
And some reasons why to avoid it...if possible, specially if using it as a reference field
Upvotes: 2