MySQL json字段 全值(全字符串)查询
巨人的肩膀mysql支持原生json使用说明背景:t表有个json类型的字段f,需查询出:f字段值为 ‘{“id”:1}’ 的数据结论需用cast转换入参为json:select * from t where f = cast('{"id":1}' as json);准备环境表结构create table t(id int auto_increment primary key,name varchar(10),f json);初始化数据insert into t(n