MYSQL使用LIKE匹配时默认是不区分大小写的.
例:
select * from table_name where a like 'wss%'
select * from table_name where a like 'WSS%'
匹配的结果是一致的.
区分大小写匹配:
select * from table_name where binary a like 'wss%'
select * from table_name where binary a like 'wss%'
这样就行区分大小写匹配
或者我们在建立字段时设置大小标识
create table table_name( wss varchar (20) binary )
MYSQL LIKE 区分大小写匹配
最新推荐文章于 2024-07-19 03:22:27 发布