当前位置: 代码迷 >> Sql Server >> 请问一个类似于gogole查询的sql语句
  详细解决方案

请问一个类似于gogole查询的sql语句

热度:21   发布时间:2016-04-27 12:13:06.0
请教一个类似于gogole查询的sql语句
用户输入的条件为'a b+c e+f'
希望得到的sql语句为
select * from table where (field like '%a%' or (filed like '%b' and filed like '%c' ) or (filed like '%e' and filed like '%f' ))
多谢

------解决方案--------------------
SQL code
select * from table where field LIKE '%[ab][ce]f%'
------解决方案--------------------
SQL code
select * from table where field LIKE '%[ab][ce]f%
  相关解决方案