sql中怎样计算某个字符在字符串中有多少个

select (length('oracle11g, oracle10g oracle9i | oracle8i') -
               length(replace('oracle11g, oracle10g oracle9i | oracle8i',
                              'oracle',
                              '')))/length('oracle') string_count           from dual;




你可能感兴趣的:(oracle,sql,字符串,replace函数)