VARCHAR trim_in(VARCHAR str[, VARCHAR rhs])
When there is no rhs parameter, remove the spaces that appear consecutively at the right and left beginning of the parameter str; when there is an rhs parameter, search and remove any characters in the rhs character set at both ends of the string (regardless of order)
mysql> SELECT trim_in(' ab d ') str; +------+ | str | +------+ | ab d | +------+ mysql> SELECT trim_in('ababccaab','ab') str; +------+ | str | +------+ | cc | +------+
TRIM_IN