Mysql中模糊查询区分大小写的两种方法

2022-09-03 10:16:51

在oracle中模糊查询默认区分大小写,在mysql中默认不区分

一、查询语句上加binary

select * from user where user.name like binary '%T956' order by id

二、建表时加binary

create table t{

code varchar(10) binary

}
  • 作者:雨后浅浅唱
  • 原文链接:https://blog.csdn.net/my13413527259/article/details/86230108
    更新时间:2022-09-03 10:16:51