题解 | #查找字符串中逗号出现的次数#
查找字符串中逗号出现的次数
https://www.nowcoder.com/practice/e3870bd5d6744109a902db43c105bd50
# 使用char_length和replace函数来计数 select id, char_length(string) - char_length(replace(string,',','')) cnt from strings;
查找字符串中逗号出现的次数
https://www.nowcoder.com/practice/e3870bd5d6744109a902db43c105bd50
# 使用char_length和replace函数来计数 select id, char_length(string) - char_length(replace(string,',','')) cnt from strings;
相关推荐