Syntax
MID(str,pos,len)
Purpose
Returns the 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 if the starting position specified byposis invalid, the function returns an empty string.
This function is an alias for SUBSTRING(str,pos,len).
Examples
obclient> SELECT MID('OceanBase',6);
+--------------------+
| MID('OceanBase',6) |
+--------------------+
| Base |
+--------------------+
1 row in set
