Syntax
MID(str,pos,len)
Purpose
This function 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 starting position is reversely determined from the end ofstr.If
lenis less than or equal to 0, or the starting position specified forposis 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 (0.00 sec)