Mariadb Position Function
MariaDB: POSITION Function
This MariaDB tutorial explains how to use the MariaDB POSITION function with syntax and examples.
Description
The MariaDB POSITION function returns the location of a substring in a string.
Syntax
The syntax for the POSITION function in MariaDB is:
Parameters or Arguments
- substring
The substring to search for in string.
- string
The string to search.
Note
- The first position in string is 1.
- If substring is not found in string, then the POSITION function will return 0.
- When searching for the location of a substring in a string, the POSITION function does not perform a case-sensitive search.
- The POSITION function is a synonym for the LOCATE function.
Applies To
The POSITION function can be used in the following versions of MariaDB:
Example
Let's look at some MariaDB POSITION function examples and explore how to use the POSITION function in MariaDB.
For example: