+ (3rd byte code * 256^2) ... 

If the leftmost character is not a multibyte character, ORD()  returns the same value as the ASCII() function. 

mysql> SELECT ORD(’2’); -> 50 

## • POSITION( substr  IN str ) 

POSITION( substr  IN str )  is a synonym for LOCATE( substr , str ) . 

## • QUOTE( 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. 

mysql> SELECT QUOTE(’Don\’t!’); -> ’Don\’t!’ mysql> SELECT QUOTE(NULL); -> NULL 

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(). 

## • REPEAT( str , count ) 

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 . 

mysql> SELECT REPEAT(’MySQL’, 3); -> ’MySQLMySQLMySQL’ 

## • REPLACE( str , from_str , to_str ) 

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 . 

mysql> SELECT REPLACE(’www.mysql.com’, ’w’, ’Ww’); -> ’WwWwWw.mysql.com’ 

This function is multibyte safe. 

## • REVERSE( str ) 

Returns the string str  with the order of the characters reversed. 

mysql> SELECT REVERSE(’abc’); -> ’cba’ 

This function is multibyte safe. 

## • RIGHT( str , len ) 

Returns the rightmost len  characters from the string str , or NULL  if any argument is NULL . 

mysql> SELECT RIGHT(’foobarbar’, 4); -> ’rbar’ 

