查询表中有逗号什么的

来源:互联网 发布:淘宝上刷信誉可信吗 编辑:程序博客网 时间:2024/04/29 23:19

有两张表

表一 类似 :


表二类似 :


如果表一中的permit_code存在表二中的permit_code中如何查询呢

select * from perm_permit_group where concat(',', permit_code, ',') like '%,010101,%'


concat是给字段都加上 "," 

原创粉丝点击