C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML
| MySQL SUBSTR() FunctionThe substr() is a String function of MySQL. This function returns the substring from the given string. Syntax
 select substr(Str, pos); Select substr(Str from pos); Select substr(Str, pos, len); Select substr(Str from pos for len); Parameter:
 Str: Main string Len: length for substring Pos: position the start the substring from the given string. Example 1
 
Select substr('TheDeveloperBlog', 5);
Output:   Example 2
Select substr('TheDeveloperBlog' from 6);
Output:   Example 3
Select substr('TheDeveloperBlog', 8,3);
Output:   Example 4
Select substr('TheDeveloperBlog' from 1 for 4);
Output:   
Next TopicMySQL String
 |