Syntax
MID(str,pos,len)
Purpose
MID() returns a substring of str. The start position is pos, and the length of the substring is len characters. If any argument is NULL, the function returns NULL.
If
lenis not specified, the returned substring starts from the positionpostill the end ofstr.If the value of
posis negative, the start position is reversely determined from the end ofstr.If
lenis less than or equal to 0, or the start position specified byposis invalid, an empty string is returned.
This function is the alias of the SUBSTRING(str,pos,len) function.
Examples
obclient> SELECT MID('OceanBase',6);
+--------------------+
| MID('OceanBase',6) |
+--------------------+
| Base |
+--------------------+
1 row in set