Jan 28

oracle统计字符串中某个字符出现的次数 不指定

做个记录:


SELECT LENGTHB(TRANSLATE('1,2,34,5',',12345',',')) FROM DUAL;
SELECT LENGTHB('1,2,34,5')-LENGTHB(REPLACE('1,2,34,5',',','')) FROM DUAL;
Add a comment

Nickname

Site URI

Email

Enable HTML Enable UBB Enable Emots Hidden Remember [Login] [Register]