Home > Database > Mysql Tutorial > mysql查询区分大小写的问题_MySQL

mysql查询区分大小写的问题_MySQL

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-01 13:42:15
Original
1162 people have browsed it

bitsCN.com mysql查询区分大小写的问题 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  )  作者 sss0213 bitsCN.com

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
MySQL stops process
From 1970-01-01 08:00:00
0
0
0
Error when installing mysql on linux
From 1970-01-01 08:00:00
0
0
0
phpstudy cannot start mysql?
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template