题解 | #LENGTH 计算字符串长度#
查找字符串中逗号出现的次数
https://www.nowcoder.com/practice/e3870bd5d6744109a902db43c105bd50
select id, length(string) - length(replace(string, ",", "")) cnt from strings
通过 replace 将列中的 ,
替换成 ""即可得。
查找字符串中逗号出现的次数
https://www.nowcoder.com/practice/e3870bd5d6744109a902db43c105bd50
select id, length(string) - length(replace(string, ",", "")) cnt from strings
通过 replace 将列中的 ,
替换成 ""即可得。
相关推荐