This MariaDB tutorial explains how to use the MariaDB SUBSTRING function with syntax and examples.
The MariaDB SUBSTRING function allows you to extract a substring from a string.
The syntax for the SUBSTRING function in MariaDB is:
OR
The source string.
The position for extraction. The first position in the string is always 1.
Optional. It is the number of characters to extract. If this parameter is omitted, it will return the entire string.
The SUBSTRING function can be used in the following versions of MariaDB:
Let's look at some MariaDB SUBSTRING function examples and explore how to use the SUBSTRING function in MariaDB.
For example: