mysql - 为什么当我使用像“select * from table_name where character='⺎'”这样的选择语句然后返回'尤','⼪','⺎'和'⺐'
问题描述
mysql查询返回不匹配的记录,如查询字段character='兀'但匹配出,尤,⺎,⺐?
我把我的mysql从5.7更新到8.0,在5.7,这个问题比较常见
drop database if exists `chinese_sort`;
create database `chinese_sort` default charset utf8mb4;
use `chinese_sort`;
create table `chinese_character_dict_standard_version`(
`id` bigint primary key auto_increment,
`character` char(1) not null comment '字',
`chinese_pinyin` varchar(50) default '' comment '拼音',
`stroke_num` tinyint not null default 0 comment '笔画数',
`four_corner_num` varchar(5) default '' comment '四角号码',
`unicode` varchar(12) not null comment 'unicode码',
`utf16` varchar(12) not null comment 'utf16码'
);
insert into chinese_character_dict_standard_version(`character`, unicode, utf16)
values('尢','5c22','\u5c22'),
('⼪','2f2a','\u2f2a'),
('⺎','2e8e','\u2e8e'),
('⺐','2e90','\u2e90');
SET NAMES utf8mb4 collate utf8mb4_unicode_ci;
select * from chinese_character_dict_standard_version
where `character` ='⺎';
我希望select语句的输出是'兀',但实际输出是兀'、'尤'、'⺎'、'⺐'
解决方案
推荐阅读
- r - geom_line 中的 ggplot 如何计算插值它的颜色?
- solr - 如何在 hybris 中排除 solr facet 搜索结果?
- unix - 带有波形符号的 Unix env 路径变量
- debugging - Chrome 检查视图需要打开才能扩展功能
- python - tensorflow.python.framework.errors InternalError:无法创建会话
- javascript - 如何在电子应用程序中包含 bootstrap 4
- wso2 - WSO2 API Manager 2.2.0 - 如何为其他租户用户启用 grant_type=password?
- javascript - 百分比函数显示空白
- excel - 如何在组合框中制作两列?
- java - 在 2^32 内溢出不会引发 ArithmeticException