[英]MySQL regexp search json
In mysql I have this table: 在mysql中,我有此表:
id types_id
1 ["1","2"]
2 ["1","2","3"]
3 ["2","3"]
...
I wanna use REGEXP
to get all rows that contain "3"
at types_id
json 我想使用REGEXP
在types_id
json中获取所有包含"3"
行
您不需要正则regexp
,只需使用like
。
where types_id like '%"3"%'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.