字段like多个条件(or关系)简写
字段 like ‘匹配串1’or 字段 like ‘匹配串2’or ... 有如下简写方式
oracle:
SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。select * from tablex where REGEXP_LIKE(字段名, '(匹配串1|匹配串2|...)') ;//全模糊匹配
select * from tablex where REGEXP_LIKE(字段名, '^(匹配串1|匹配串2|...)') ";//右模糊匹配
select * from tablex where REGEXP_LIKE(字段名, '(匹配串1|匹配串2|...)$') ";//左模糊匹配
SqlServer
select * from tablex where f1 like '%[匹配串1|匹配串2|匹配串3]%'

更多精彩