Cast Functions and Operators A string used in an arithmetic operation is converted to a floating-point number during expression evaluation. A number used in string context is converted to a string: For information about implicit conversion of numbers to strings, see Section 12.3, “Type Conversion in Expression Evaluation” . MySQL supports arithmetic with both signed and unsigned 64-bit values. For numeric operators (such as  +  or  - ) where one of the operands is an unsigned integer, the result is unsigned by default (see Section 12.6.1, “Arithmetic Operators” ). To override this, use the  SIGNED  or  UNSIGNED  cast operator to cast a value to a signed or unsigned 64-bit integer, respectively. If either operand is a floating-point value, the result is a floating-point value and is not affected by the preceding rule. (In this context,  DECIMAL  column values are regarded as floating-point values.) The SQL mode affects the result of conversion operations (see Section 5.1.11, “Server SQL Modes” ). Examples: The following list describes the available cast functions and operators: The  BINARY  operator converts the expression to a binary string (a string that has the  binary  character set and  binary  collation). A common use for  BINARY  is to force a character string comparison to be done byte by byte using numeric byte values rather than character by character. The  BINARY  operator also causes trailing spaces in comparisons to be significant. For information about the differences between the  binary  collation of the  binary  character set and the  _bin  collations of nonbinary character sets, see Section 10.8.5, “The binary Collation Compared to _bin Collations” . In a comparison,  BINARY  affects the entire operation; it can be given before either operand with the same result. 2233 mysql>  SELECT ’a’ = ’A’; -> 1 mysql>  SELECT BINARY ’a’ = ’A’; -> 0 mysql>  SELECT ’a’ = ’a ’; -> 1 mysql>  SELECT BINARY ’a’ = ’a ’; -> 0 mysql>  SELECT CAST(1 AS UNSIGNED) - 2.0; -> -1.0 mysql>  SELECT 1 - 2; -> -1 mysql>  SELECT CAST(1 - 2 AS UNSIGNED); -> 18446744073709551615 mysql>  SELECT CAST(CAST(1 - 2 AS UNSIGNED) AS SIGNED); -> -1 mysql>  SELECT CONCAT(’hello you ’,2); -> ’hello you 2’ •For conversion of a “zero”  date string to a date,  CONVERT()  and  CAST()  return  NULL  and produce a warning when the  NO_ZERO_DATE  SQL mode is enabled. •For integer subtraction, if the  NO_UNSIGNED_SUBTRACTION  SQL mode is enabled, the subtraction result is signed even if any operand is unsigned. • BINARY expr