成都创新互联网站制作重庆分公司

binary在select中用来区分大小写

CREATE TABLE animals (

目前创新互联已为上千的企业提供了网站建设、域名、虚拟主机网站托管、企业网站设计、望江网站维护等服务,公司将坚持客户导向、应用为本的策略,正道将秉承"和谐、参与、激情"的文化,与客户和合作伙伴齐心协力一起成长,共同发展。

    id MEDIUMINT NOT NULL AUTO_INCREMENT,

    name CHAR(30) NOT NULL,

    PRIMARY KEY (id)

);

insert into animals values(null,'kitty'),(null,'KITTY'),(null,'hello');

#没用binary

select id from animals where name like '%it%';

+----+

| id |

+----+

|  1 |

|  2 |

+----+

2 rows in set (0.00 sec)

#用到binary

select id from animals where name like binary '%it%';

+----+

| id |

+----+

|  1 |

+----+

1 row in set (0.03 sec)


新闻名称:binary在select中用来区分大小写
分享URL:http://cxhlcq.com/article/jpoege.html

其他资讯

在线咨询

微信咨询

电话咨询

028-86922220(工作日)

18980820575(7×24)

提交需求

返回顶部