mysql5.7中 json函数
作者:互联网
官方文档:json相关函数
https://dev.mysql.com/doc/refman/5.7/en/json-creation-functions.html
json数组,数组元素是对象
# 表字段名: templates
# json内容: [{"expression": "true", "id": 2}]
SELECT * FROM t_rule WHERE json_contains(templates, json_object('id', 1)) ; SELECT * FROM t_rule WHERE json_contains(templates, json_object('expression', 'true')) ;
标签:templates,函数,mysql5.7,rule,json,WHERE,id,SELECT 来源: https://www.cnblogs.com/smileblogs/p/15967598.html