select id,length(string)-length(replace(string,",","")) cnt from strings;
之前一直不知道length这个函数,也是看了解题区才写出来这题的,感觉还是有些迷迷糊糊的,对于 length(replace(string,",","")这部分并不是很理解
select id,length(string)-length(replace(string,",","")) cnt from strings;
之前一直不知道length这个函数,也是看了解题区才写出来这题的,感觉还是有些迷迷糊糊的,对于 length(replace(string,",","")这部分并不是很理解