1、要求查询中要区分大小写
比如:select * from demo_users where u_name = ‘Joyous’
这样会查询出来u_name = Joyous和u_name = joyous俩个,怎么才能区分大小写呢?我结果只要显示u_name = Joyous的那一行信息
select * from demo_users where u_name = binary(‘Joyous’)
或者
select * from demo_users where binary u_name = ‘Joyous’
binary这不是一个函数,而是将字符串进行二进制比较,这样就能区分大小写了。