Are UNIQUE indices case sensitive in MySQL?

nickf picture nickf · Jan 21, 2009 · Viewed 19.5k times · Source

Are indices (indexes) defined as UNIQUE case sensitive in MySQL?

Answer

Eran Galperin picture Eran Galperin · Jan 21, 2009

It depends on the collation of the field - if it's ci (case insensitive) or cs (case sensitive). The unique index would apply accordingly.