I have a field in a table with data separated by a comma: condicao_pagamento: 20,25,35,45,50
.
How do I count the number of comma-separated items using MySQL only?
I have a field in a table with data separated by a comma: condicao_pagamento: 20,25,35,45,50
.
How do I count the number of comma-separated items using MySQL only?
Check if this is what you want:
LENGTH(fooCommaDelimColumn) - LENGTH(REPLACE(fooCommaDelimColumn, ',', ''))