Forums

MySQL database uppercase/lowercase

Hello

I'm getting an error from queries in MySQL because I have similar database entries but with different lowercase and uppercase. So for example:

"Ball" and "ball"

are taken as equal and if I query for "Ball" two values are returned and thus the error.

Is there a way to modify this on the pythonanywhere console?

thanks

That's normal MySQL behaviour; this Stack Overflow question has some good answers.

thank you, I managed to do it with the command below:

ALTER DATABASE "database_name" CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;

thank you

Thanks for confirming!