mysql中查看一个字段中,有几个逗号
时间:2015-10-19 15:15:09
收藏:0
阅读:418
利用replace、length的内置函数
SELECT id, length(field) - length(replace(field,‘,‘,‘‘))+1 as count FROM `table` where 1
原文:http://www.cnblogs.com/firstForEver/p/4891815.html
评论(0)