Ett av de vanliga knepen för detta är att använda en kombination av length och replace :
select (length(your_col) - length(replace(your_col, ','))) from your_table;
replace utan ett tredje argument tar helt enkelt bort tecknet.
Ett av de vanliga knepen för detta är att använda en kombination av length och replace :
select (length(your_col) - length(replace(your_col, ','))) from your_table;
replace utan ett tredje argument tar helt enkelt bort tecknet.