Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

mysql count characters in string

#character_count is how many occurences of p there are in "my_column" 
SELECT 
(LENGTH(my_column)-LENGTH(REPLACE (my_column, "p", ""))) AS character_count     
FROM my_table; 
 
PREVIOUS NEXT
Tagged: #mysql #count #characters #string
ADD COMMENT
Topic
Name
8+6 =