← Back to team overview

maria-discuss team mailing list archive

Re: Change case with unique constraint

 

On Sunday 21 August 2022 at 21:28:13, Keith Edmunds wrote:

> MariaDB [test]> update kae set name="Test" where id=1;
> ERROR 1062 (23000): Duplicate entry 'Test' for key 'unique_name'

Check the collation type for the table:

https://mariadb.com/kb/en/supported-character-sets-and-collations/#collations

https://mariadb.com/kb/en/setting-character-sets-and-collations/

I suspect the problem you have is that your table uses a case-insensitive 
collation.


Antony.

-- 
The Royal Society for the Prevention of Cruelty to Animals was formed in 1824.
The National Society for the Prevention of Cruelty to Children was not formed 
until 1884.
That says something about the British.

                                                   Please reply to the list;
                                                         please *don't* CC me.


References