日期:2014-05-17 浏览次数:20847 次
select * from product p where p.name like '%幸福%' or p.Description like '%幸福%';
select p.*,
case
when instr(name, '幸福') > 0 then
1
else
null
end flg
from product p
where p.name like '%幸福%'
or p.Description like '%幸福%'
order by flg nulls last
select * from product p where p.name like '%幸福%' or p.Description like '%幸福%'
order by instr(p.name, '幸福') desc;