select a.* from 表 as a ,(select b.id,case when 条件 then 0 else 1 as tj from 表) as bwhere a.id = b.idorder by b.tj
是模糊搜索吗?使用like '%%',不符合要求的就不显示了。