标签:select contains 用户 border time 数据表 UI sql where
来源于网络,未验证。
数据表
id | uid | info |
1 | 1001 | {"name":"周年庆","status":0,"addtime":"2017-10-10"} |
2 | 1002 | [ {"name":"周年庆","status":0,"addtime":"2017-10-11"},{"name":"特价促销","status":0,"addtime":"2017-10-12"}] |
3 | 1003 | [ {"name":"特价促销","status":0,"addtime":"2017-10-12"},{"name":"国庆促销","status":0,"addtime":"2017-09-28"}] |
取“特价促销”的用户数据
select * from tb where info->‘$.name‘ = ‘特价促销‘ or JSON_CONTAINS(info->‘$[*].name‘, ‘"特价促销"‘, ‘$‘)
标签:select contains 用户 border time 数据表 UI sql where
原文地址:https://www.cnblogs.com/xiede/p/9127606.html