78
MySQL SUBSTRING_INDEX() Function
The substring_index() is a String function of MySQL. This function returns a substring from the given string(str) before the counts come of the delimiter.
Syntax
Parameter:
str: main string
delim: string to be searched
count: number of times to search delim
Returns:
This function returns the substring of the string before a number of occurrences of delimiter.
Example 1
Output:
Example 2
Output:
Example 3
Output:
Example 4
Output:
Example 5
Output:
Next TopicMySQL String