mysql中查看一个字段中,有几个逗号 利用replace、length的内置函数 SELECT id, length(field) - length(replace(field,',',''))+1 as count FROM `table` where 1