C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML
MySQL SUBSTRING() FunctionThe substring() is a String function of MySQL. This function returns the substring from the given string. Syntaxselect substring(Str, pos); Select substring(Str from pos); Select substring(Str, pos, len); Select substring(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 substring('TheDeveloperBlog', 5); Output: Example 2Select substring('TheDeveloperBlog' from 6); Output: Example 3Select substring('TheDeveloperBlog', 8,3); Output: Example 4Select substring('TheDeveloperBlog' from 1 for 4); Output:
Next TopicMySQL String
|