Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

mysql find char in string

LOCATE(substring, string, start)

-- example:
SELECT LOCATE('S', "I have a dog and she has a cat.", 5) AS Result;
-- result: 18 (index of the first char occurance)

-- note: LOCATE is case insensitive
 
PREVIOUS NEXT
Tagged: #mysql #find #char #string
ADD COMMENT
Topic
Name
3+3 =