【MySQL】求一个SQL语句的优化-灵析社区

霹雳青

select * from yq_product where instr(concat(title,',',metakey,',',metadesc,',',cat_name,',',brand_name), '品') order by instr(concat(title,',',metakey,',',metadesc,',',cat_name,',',brand_name), '品') 就是 instr(concat(title,',',metakey,',',metadesc,',',cat_name,',',brand_name), '品') 这一句,有办法不重复吗? 试过这样不行: select *, instr(concat(title,',',metakey,',',metadesc,',',cat_name,',',brand_name), '品') as search from yq_product where search>0 order by search

阅读量:197

点赞量:0

问AI
英勇投弹手
加个变量 where @st:=instr(...) order by @st;