C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML
MySQL LOCATE() FunctionLOCATE(substr,str) is a Sring function of MySQL. This method returns the first occurrence of given substr in the given string, Syntax
select locate(substr, str); Example 1
select locate('point', 'TheDeveloperBlog');
Output:
Example 2
select locate('sql, 'mysql');
Output:
Next TopicMySQL String
|