日期:2014-05-17  浏览次数:20900 次

模糊查询问题~~
例如有下面表A
id content
1 10,107,108
2 10,25,54
当用(select * from 表A where content like '%10%')时候,显示记录是10 107 108,现在就是想必须模糊查询,但是条件为查“10”的时候,不能出现107和108数值,谢谢~~

------解决方案--------------------
select * from 表A where content like '%10,%'
------解决方案--------------------
SQL code
select * from 表A where ','+content+',' like '%,10,%'