mysql统计字符串中‘#’号的个数(急,求助!)
有这样的一个字符串“1002#10131#145#154#10111#125#15#10121#15#105#”,请问如何统计出该字符串中‘#’的数目?
急,请大家帮帮忙!
select length(field1)-length(replace(field1,’#’,”)) from test;
学习了。。。学习了。。。学习了。。。
探讨
select length(field1)-length(replace(field1,’#’,”)) from test;
#1楼 正解。 .