SQL 模糊查询碰到的问题
select * from BearerTb where Role='经纪人' and Uid like'%仁义%'and Phone like'%36%' or IDcard like '%36%'
上面是查询语句, 我现在想查的是 Role='经纪人'and Uid like'%仁义%'并且 Phone 或者IDcard 两个字段任何一个字段 like '%36%'都行,。。但是上面的查询明显满足不了要求,, 求SQL 大神
------解决方案--------------------select * from BearerTb
where Role='经纪人' and Uid like'%仁义%'
and (Phone like'%36%' or IDcard like '%36%')
lz建议你看一下基础知识,这样会了解全面一下