• TIME_TRUNCATE_FRACTIONAL 

Control whether rounding or truncation occurs when inserting a TIME , DATE , or TIMESTAMP  value with a fractional seconds part into a column having the same type but fewer fractional digits. The default behavior is to use rounding. If this mode is enabled, truncation occurs instead. The following sequence of statements illustrates the difference: 

CREATE TABLE t (id INT, tval TIME(1)); SET sql_mode=’’; INSERT INTO t (id, tval) VALUES(1, 1.55); SET sql_mode=’TIME_TRUNCATE_FRACTIONAL’; INSERT INTO t (id, tval) VALUES(2, 1.55); 

The resulting table contents look like this, where the first value has been subject to rounding and the second to truncation: 

## Combination SQL Modes 

mysql> SELECT id, tval FROM t ORDER BY id; +------+------------+ | id | tval | +------+------------+ | 1 | 00:00:01.6 | | 2 | 00:00:01.5 | +------+------------+ 

See also Section 11.2.6, “Fractional Seconds in Time Values” . 

The following special modes are provided as shorthand for combinations of mode values from the preceding list. 

• ANSI 

Equivalent to REAL_AS_FLOAT , PIPES_AS_CONCAT , ANSI_QUOTES , IGNORE_SPACE , and ONLY_FULL_GROUP_BY . 

ANSI  mode also causes the server to return an error for queries where a set function S  with an outer reference S ( outer_ref )  cannot be aggregated in the outer query against which the outer reference has been resolved. This is such a query: 

SELECT * FROM t1 WHERE t1.a IN (SELECT MAX(t1.b) FROM t2 WHERE ...); 

Here, MAX(t1.b)  cannot aggregated in the outer query because it appears in the WHERE  clause of that query. Standard SQL requires an error in this situation. If ANSI  mode is not enabled, the server treats S ( outer_ref )  in such queries the same way that it would interpret S ( const ) . 

See Section 1.7, “MySQL Standards Compliance” . 

• TRADITIONAL 

TRADITIONAL  is equivalent to STRICT_TRANS_TABLES , STRICT_ALL_TABLES , NO_ZERO_IN_DATE , NO_ZERO_DATE , ERROR_FOR_DIVISION_BY_ZERO , and NO_ENGINE_SUBSTITUTION . 

## Strict SQL Mode 

Strict mode controls how MySQL handles invalid or missing values in data-change statements such as INSERT  or UPDATE . A value can be invalid for several reasons. For example, it might have the wrong data type for the column, or it might be out of range. A value is missing when a new row to be inserted does not contain a value for a non- NULL  column that has no explicit DEFAULT  clause in its definition. (For a NULL 

