how to search for exact string in mysql

后端 未结 5 1996
一整个雨季
一整个雨季 2020-12-08 22:36

I\'m trying to search for an exact match of a string in mysql. The string is \'nrew\'. But when I do the queries below, I still get a result:

SELECT UserID F         


        
5条回答
  •  悲&欢浪女
    2020-12-08 23:19

    You can use keyword Binary,

    SELECT UserID FROM sys_users WHERE BINARY UserID='nrew'
    

    refer to here

提交回复
热议问题