MID
Declaration
MID(str,pos,len)
Description
Returns a substring of str starting at pos and having a length of len. If any parameter is NULL, the function returns NULL.
-
If
lenis not specified, the substring starts atposand extends to the end ofstr. -
If
posis negative, the starting position is determined by counting backward from the end ofstr. -
If
lenis less than or equal to 0, or ifposspecifies an invalid starting position, an empty string is returned.
This function is an alias for SUBSTRING(str,pos,len).
Examples
SELECT MID('OceanBase',6);
+--------------------+
| MID('OceanBase',6) |
+--------------------+
| Base |
+--------------------+
1 row in set (0.001 sec)