Altering Mysql Table column to be case sensitive

后端 未结 4 2057
轮回少年
轮回少年 2020-12-08 01:10

I have a table in my Mysql database, which is used for authentication. And now, I need to make the authentication case sensitive. Googling around, I have realized Mysql col

4条回答
  •  隐瞒了意图╮
    2020-12-08 01:41

    Rather than altering your table, you can still perform case sensitive queries on your table when authenticating, use the BINARY option as follows:

    SELECT BINARY * FROM USERS where USER_ID = 2 AND USER_NAME = 'someone' LIMIT 1;
    

    Does this help?

提交回复
热议问题