日期:2014-05-18 浏览次数:20514 次
select * from ( select *, case when title like '关键字1' then 1 else 0 end + case when title like '关键字2' then 1 else 0 end + ... case when title like '关键字n' then 1 else 0 end + case when author like '关键字1' then 1 else 0 end + case when author like '关键字2' then 1 else 0 end + ... case when author like '关键字n' then 1 else 0 end as cnt from tb ) t where cnt > 0 order by cnt desc