时间:2021-07-01 10:21:17 帮助过:19人阅读
SQL1:
SELECT count(1) FROM img_chart_def d where d.chart_name like ‘%‘ and d.chart_class = ‘consumeContribution‘;
SQL2:
SELECT COUNT(1) FROM img_chart_def d where d.chart_class = ‘consumeContribution‘ and ( d.chart_name like ‘会%‘
OR d.chart_name like ‘A%‘ OR d.chart_name like ‘最%‘ OR d.chart_name like ‘品%‘ OR d.chart_name like ‘购%‘
or d.chart_name like ‘测%‘ OR d.chart_name like ‘c%‘ OR d.chart_name like ‘注%‘ OR d.chart_name like ‘性%‘
OR d.chart_name like ‘生%‘
OR d.chart_name like ‘星%‘ OR d.chart_name like ‘各%‘
OR d.chart_name like ‘所%‘
OR d.chart_name like ‘报%‘ OR d.chart_name like ‘参%‘ OR d.chart_name like ‘服%‘ or d.chart_name like ‘会%‘);
MySQL 中 and 和 or 的组合使用
标签:like 使用 www sql 过滤 href rom chart http