标签:blog div log as tt sql 简单 class rom
select length(f3) - length(replace(f3, ‘a‘,‘‘)) from t1 简单的,如果,要统计 good 出现的次数,改成 select (length(f3) - length(replace(f3, ‘good ‘,‘‘))) / length(‘good‘) from t1 ----------------------------------- SQL> select (length(‘XXgoodXXXXgoodxxx‘) - 2 length(replace(‘XXgoodXXXXgoodxxx‘, ‘good‘, ‘‘))) / length(‘good‘) 次数 3 from dual; 次数 ---------- 2
标签:blog div log as tt sql 简单 class rom
原文地址:http://www.cnblogs.com/alphafly/p/4120405.html