问题描述
一条查询语句 模糊查询 完全匹配的优先 请教高手 本人菜鸟 问题补充:suziwen 写道
解决方案
这个估计比较麻烦,看能不能这样select * from a where a.name = 'aaa' union all select * from a where a.name like '%aaa%' and a.name != 'aaa'
解决方案二:
那就。。。。select * from a where a.name = 'aaa' union all select * from a where a.name like 'aaa%' and a.name != 'aaa' union all select * from a where a.name like '%aaa' and a.name != 'aaa'
解决方案三:
没明白。。。
时间: 2024-09-18 04:42:03