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. Syntaxselect 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 1Select substr('TheDeveloperBlog', 5); Output: Example 2Select substr('TheDeveloperBlog' from 6); Output: Example 3Select substr('TheDeveloperBlog', 8,3); Output: Example 4Select substr('TheDeveloperBlog' from 1 for 4); Output:
Next TopicMySQL String
|