工作中遇到个情况 sql如下: SELECT org.id orgid,org."path" FROM ( SELECT * FROM A INNER JOIN t_org org ON ... INNER JOIN C org ON ... INNER JOIN D b ON ... INNER JOIN E bsns ON ... LEFT JOIN F logopttp ON ... LEFT JOIN G sysopttp ON ... WHERE = -- AND org.P
instr(title,'手册')>0 相当于 title like '%手册%' instr(title,'手册')=1 相当于 title like '手册%' instr(title,'手册')=0 相当于 title not like '%手册%' t表中将近有1100万数据,很多时候,我们要进行字符串匹配,在SQL语句中,我们通常使用like来达到我们搜索的目标.但经过实际测试发现,like的效率与instr函数差别相当大.下面是一些测试结果: SQL> set timi