mysql查询默认是不区分大小写的 如:
- select * from table_name where a like 'a%'
- select * from table_name where a like 'A%'
效果是一样的。
要让mysql查询区分大小写,可以:
- select * from table_name where binary a like 'a%'
- select * from table_name where binary a like 'A%'
也可以在建表时,加以标识
- create table table_name(
- a varchar (20) binary
- )