This MariaDB tutorial explains how to use the MariaDB SUBSTR function with syntax and examples.
The MariaDB SUBSTR function allows you to extract a substring from a string.
The syntax for the SUBSTR 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 SUBSTR function can be used in the following versions of MariaDB:
Let's look at some MariaDB SUBSTR function examples and explore how to use the SUBSTR function in MariaDB.
For example: