SUBSTRING_INDEX()
This page is part of MariaDB's Documentation.
The parent of this page is: Functions for MariaDB Enterprise Server
Topics on this page:
Overview
A description for this Function has not yet been added to this Documentation.
EXAMPLES
SELECT SUBSTRING_INDEX('maria-db-db', '-', 3);
+----------------------------------------+
| SUBSTRING_INDEX('maria-db-db', '-', 3) |
+----------------------------------------+
| maria-db-db |
+----------------------------------------+
SELECT SUBSTRING_INDEX('maria-db-db', '-', 2);
+----------------------------------------+
| SUBSTRING_INDEX('maria-db-db', '-', 2) |
+----------------------------------------+
| maria-db |
+----------------------------------------+
SELECT SUBSTRING_INDEX('maria-DB-DB', 'db', 2);
+-----------------------------------------+
| SUBSTRING_INDEX('maria-DB-DB', 'db', 2) |
+-----------------------------------------+
| maria-DB-DB |
+-----------------------------------------+
SELECT SUBSTRING_INDEX('maria-db-db', 'db', -2);
+------------------------------------------+
| SUBSTRING_INDEX('maria-db-db', 'db', -2) |
+------------------------------------------+
| -db |
+------------------------------------------+
CHANGE HISTORY
EXTERNAL REFERENCES
Additional information on this topic may be found in the MariaDB Public Knowledge Base.