Returns NULL  if either argument is NULL . This function does not work properly if the first argument contains a comma ( , ) character. 

mysql> SELECT FIND_IN_SET(’b’,’a,b,c,d’); -> 2 

• FORMAT( X , D [, locale ]) 

Formats the number X  to a format like ’#,###,###.##’ , rounded to D  decimal places, and returns the result as a string. If D  is 0 , the result has no decimal point or fractional part. 

The optional third parameter enables a locale to be specified to be used for the result number’s decimal point, thousands separator, and grouping between separators. Permissible locale values are the same as the legal values for the lc_time_names  system variable (see Section 10.16, “MySQL Server Locale Support” ). If no locale is specified, the default is ’en_US’ . 

mysql> SELECT FORMAT(12332.123456, 4); -> ’12,332.1235’ mysql> SELECT FORMAT(12332.1,4); -> ’12,332.1000’ mysql> SELECT FORMAT(12332.2,0); -> ’12,332’ mysql> SELECT FORMAT(12332.2,2,’de_DE’); -> ’12.332,20’ 

• FROM_BASE64( str ) 

Takes a string encoded with the base-64 encoded rules used by TO_BASE64()  and returns the decoded result as a binary string. The result is NULL  if the argument is NULL  or not a valid base-64 string. See the description of TO_BASE64()  for details about the encoding and decoding rules. 

mysql> SELECT TO_BASE64(’abc’), FROM_BASE64(TO_BASE64(’abc’)); -> ’JWJj’, ’abc’ 

If FROM_BASE64()  is invoked from within the mysql  client, binary strings display using hexadecimal notation, depending on the value of the --binary-as-hex . For more information about that option, see Section 4.5.1, “mysql — The MySQL Command-Line Client” . 

• HEX( str ) , HEX( N ) 

For a string argument str , HEX()  returns a hexadecimal string representation of str  where each byte of each character in str  is converted to two hexadecimal digits. (Multibyte characters therefore become more than two digits.) The inverse of this operation is performed by the UNHEX()  function. 

For a numeric argument N , HEX()  returns a hexadecimal string representation of the value of N  treated as a longlong ( BIGINT ) number. This is equivalent to CONV( N ,10,16) . The inverse of this operation is performed by CONV(HEX( N ),16,10) . 

mysql> SELECT X’616263’, HEX(’abc’), UNHEX(HEX(’abc’)); -> ’abc’, 616263, ’abc’ mysql> SELECT HEX(255), CONV(HEX(255),16,10); -> ’FF’, 255 

• INSERT( str , pos , len , newstr ) 

Returns the string str , with the substring beginning at position pos  and len  characters long replaced by the string newstr . Returns the original string if pos  is not within the length of the string. Replaces the 

