String Functions and Operators String-valued functions return  NULL  if the length of the result would be greater than the value of the max_allowed_packet  system variable. See Section 5.1.1, “Configuring the Server” . For functions that operate on string positions, the first position is numbered 1. For functions that take length arguments, noninteger arguments are rounded to the nearest integer. Returns the numeric value of the leftmost character of the string  str . Returns  0  if  str  is the empty string. Returns  NULL  if  str  is  NULL .  ASCII()  works for 8-bit characters. See also the  ORD()  function. Returns a string representation of the binary value of  N , where  N  is a longlong ( BIGINT ) number. This is equivalent to  CONV( N ,10,2) . Returns  NULL  if  N  is  NULL . mysql>  SELECT BIN(12); -> ’1100’ Returns the length of the string  str  in bits. mysql>  SELECT BIT_LENGTH(’text’); -> 32 CHAR()  interprets each argument  N  as an integer and returns a string consisting of the characters given by the code values of those integers.  NULL  values are skipped. CHAR()  arguments larger than 255 are converted into multiple result bytes. For example,  CHAR(256)  is equivalent to  CHAR(1,0) , and  CHAR(256*256)  is equivalent to  CHAR(1,0,0) : 2173 mysql>  SELECT HEX(CHAR(1,0)), HEX(CHAR(256)); +----------------+----------------+ | HEX(CHAR(1,0)) | HEX(CHAR(256)) | mysql>  SELECT CHAR(77,121,83,81,’76’); -> ’MySQL’ mysql>  SELECT CHAR(77,77.3,’77.3’); -> ’MMM’ mysql>  SELECT ASCII(’2’); -> 50 mysql>  SELECT ASCII(2); -> 50 mysql>  SELECT ASCII(’dx’); -> 100 • ASCII( str ) • BIN( N ) • BIT_LENGTH( str ) • CHAR( N ,... [USING  charset_name ]) Name Description UCASE() Synonym for UPPER() UNHEX() Return a string containing hex representation of a number UPPER() Convert to uppercase WEIGHT_STRING() Return the weight string for a string