17,090
社区成员
发帖
与我相关
我的任务
分享
--需要判断哪个,你就传递什么值,直接like就行!
select count(*) from (
select 用户,wm_concat(物品) 物品 from table1 group by 用户
)
where 物品 like '%1,3%'
and 用户 = '张三'
--或者,用instr函数
select 用户,deocde(instr(物品,变量值),0,"错误","正确")
from (
select 用户,wm_concat(物品) 物品 from table1 group by 用户
)