String Functions and Operators before conversion takes place. The result is  NULL  if the argument is  NULL . Base-64 encoded strings can be decoded using the  FROM_BASE64()  function. Different base-64 encoding schemes exist. These are the encoding and decoding rules used by TO_BASE64()  and  FROM_BASE64() : mysql>  SELECT TO_BASE64(’abc’), FROM_BASE64(TO_BASE64(’abc’)); -> ’JWJj’, ’abc’ •The encoding for alphabet value 62 is  ’+’ . •The encoding for alphabet value 63 is  ’/’ . •Encoded output consists of groups of 4 printable characters. Each 3 bytes of the input data are encoded using 4 characters. If the last group is incomplete, it is padded with  ’=’  characters to a length of 4. •A newline is added after each 76 characters of encoded output to divide long output into multiple lines. •Decoding recognizes and ignores newline, carriage return, tab, and space. • TRIM([{BOTH | LEADING | TRAILING} [ remstr ] FROM]  str ) ,  TRIM([ remstr  FROM]  str ) Returns the string  str  with all  remstr  prefixes or suffixes removed. If none of the specifiers  BOTH , LEADING , or  TRAILING  is given,  BOTH  is assumed.  remstr  is optional and, if not specified, spaces are removed. mysql>  SELECT TRIM(’ bar ’); -> ’bar’ mysql>  SELECT TRIM(LEADING ’x’ FROM ’xxxbarxxx’); -> ’barxxx’ mysql>  SELECT TRIM(BOTH ’x’ FROM ’xxxbarxxx’); -> ’bar’ mysql>  SELECT TRIM(TRAILING ’xyz’ FROM ’barxxyz’); -> ’barx’ This function is multibyte safe. UCASE()  is a synonym for  UPPER() . UCASE()  used within views is rewritten as  UPPER() . • UCASE( str ) • UNHEX( str ) For a string argument  str ,  UNHEX( str )  interprets each pair of characters in the argument as a hexadecimal number and converts it to the byte represented by the number. The return value is a binary string. mysql>  SELECT UNHEX(’4D7953514C’); -> ’MySQL’ mysql>  SELECT X’4D7953514C’; -> ’MySQL’ mysql>  SELECT UNHEX(HEX(’string’)); -> ’string’ mysql>  SELECT HEX(UNHEX(’1267’)); -> ’1267’ 2183 The characters in the argument string must be legal hexadecimal digits:  ’0’  ..  ’9’ ,  ’A’  ..  ’F’ ,  ’a’  .. ’f’ . If the argument contains any nonhexadecimal digits, the result is  NULL :