题解 | #查找字符串中逗号出现的次数 易错#
查找字符串中逗号出现的次数
https://www.nowcoder.com/practice/e3870bd5d6744109a902db43c105bd50
select id, length(string)-length(replace(string,',','')) cnt from strings
使用length 和 replace函数配合得到逗号个数
查找字符串中逗号出现的次数
https://www.nowcoder.com/practice/e3870bd5d6744109a902db43c105bd50
select id, length(string)-length(replace(string,',','')) cnt from strings
使用length 和 replace函数配合得到逗号个数
相关推荐