String Functions and Operators If the leftmost character is not a multibyte character,  ORD()  returns the same value as the  ASCII() function. POSITION( substr  IN  str )  is a synonym for  LOCATE( substr , str ) . Quotes a string to produce a result that can be used as a properly escaped data value in an SQL statement. The string is returned enclosed by single quotation marks and with each instance of backslash ( \ ), single quote ( ’ ), ASCII  NUL , and Control+Z preceded by a backslash. If the argument is NULL , the return value is the word “NULL”  without enclosing single quotation marks. For comparison, see the quoting rules for literal strings and within the C API in Section 9.1.1, “String Literals” , and mysql_real_escape_string_quote(). Returns a string consisting of the string  str  repeated  count  times. If  count  is less than 1, returns an empty string. Returns  NULL  if  str  or  count  are  NULL . Returns the string  str  with all occurrences of the string  from_str  replaced by the string  to_str . REPLACE()  performs a case-sensitive match when searching for  from_str . This function is multibyte safe. Returns the string  str  with the order of the characters reversed. This function is multibyte safe. Returns the rightmost  len  characters from the string  str , or  NULL  if any argument is  NULL . + (3rd byte code * 256^2) ... mysql>  SELECT ORD(’2’); -> 50 mysql>  SELECT QUOTE(’Don\’t!’); -> ’Don\’t!’ mysql>  SELECT QUOTE(NULL); -> NULL mysql>  SELECT REPEAT(’MySQL’, 3); -> ’MySQLMySQLMySQL’ mysql>  SELECT REPLACE(’www.mysql.com’, ’w’, ’Ww’); -> ’WwWwWw.mysql.com’ mysql>  SELECT REVERSE(’abc’); -> ’cba’ mysql>  SELECT RIGHT(’foobarbar’, 4); -> ’rbar’ 2180 • POSITION( substr  IN  str ) • QUOTE( str ) • REPEAT( str , count ) • REPLACE( str , from_str , to_str ) • REVERSE( str ) • RIGHT( str , len )