mysql 查询字段中JSON字符串中的键值 使用JSON_EXTRACT
文档地址https://mariadb.com/kb/en/json_extract/
//创建临时表
create temporary table if not EXISTS testab(
namm VARCHAR(200)
);
//插入数据
INSERT into testab values('{"name":"1234"}');
//查询全部数据
select * from testab;
//查询JSON数据
select * from testab where JSON_EXTRACT(namm,'$.name')="123";