Precision Math • VALUES( col_name ) In an  INSERT ... ON DUPLICATE KEY UPDATE  statement, you can use the  VALUES( col_name ) function in the  UPDATE  clause to refer to column values from the  INSERT  portion of the statement. In other words,  VALUES( col_name )  in the  UPDATE  clause refers to the value of  col_name  that would be inserted, had no duplicate-key conflict occurred. This function is especially useful in multiple-row inserts. The  VALUES()  function is meaningful only in the  ON DUPLICATE KEY UPDATE  clause of INSERT  statements and returns  NULL  otherwise. See Section 13.2.6.2, “INSERT ... ON DUPLICATE KEY UPDATE Statement” . mysql>  INSERT INTO table (a,b,c) VALUES (1,2,3),(4,5,6) ->  ON DUPLICATE KEY UPDATE c=VALUES(a)+VALUES(b); This usage is deprecated in MySQL 8.0.20, and is subject to removal in a future release of MySQL. Use a row alias, or row and column aliases, instead. See Section 13.2.6.2, “INSERT ... ON DUPLICATE KEY UPDATE Statement” , for more information and examples. Important 12.25 Precision Math MySQL provides support for precision math: numeric value handling that results in extremely accurate results and a high degree control over invalid values. Precision math is based on these two features: These features have several implications for numeric operations and provide a high degree of compliance with standard SQL: •SQL modes that control how strict the server is about accepting or rejecting invalid data. •The MySQL library for fixed-point arithmetic. • Precise calculations : For exact-value numbers, calculations do not introduce floating-point errors. Instead, exact precision is used. For example, MySQL treats a number such as  .0001  as an exact value rather than as an approximation, and summing it 10,000 times produces a result of exactly  1 , not a value that is merely “close”  to 1. • Well-defined rounding behavior : For exact-value numbers, the result of  ROUND()  depends on its argument, not on environmental factors such as how the underlying C library works. • Platform independence : Operations on exact numeric values are the same across different platforms such as Windows and Unix. • Control over handling of invalid values : Overflow and division by zero are detectable and can be treated as errors. For example, you can treat a value that is too large for a column as an error rather than having the value truncated to lie within the range of the column’s data type. Similarly, you can treat division by zero as an error rather than as an operation that produces a result of  NULL . The choice of which approach to take is determined by the setting of the server SQL mode. The following discussion covers several aspects of how precision math works, including possible incompatibilities with older applications. At the end, some examples are given that demonstrate how MySQL handles numeric operations precisely. For information about controlling the SQL mode, see Section 5.1.11, “Server SQL Modes” . 12.25.1 Types of Numeric Values 2454