在这种情况下,MySQL将考虑随附的一组单位值中提供的两个中的第一个值。在根据INTERVAL关键字给出的单位,根据封闭集合中的考虑值,计算间隔后,它将返回输出以及警告。
以下示例将对其进行澄清-
mysql> Select TIMESTAMP('2017-10-22 04:05:36' + INTERVAL '4 2' Hour)AS 'HOUR VALUE INCREASED BY 4'; +---------------------------+ | HOUR VALUE INCREASED BY 4 | +---------------------------+ | 2017-10-22 08:05:36 | +---------------------------+ 1 row in set, 1 warning (0.00 sec) mysql> Show warnings; +---------+------+------------------------------------------+ | Level | Code | Message | +---------+------+------------------------------------------+ | Warning | 1292 | Truncated incorrect INTEGER value: '4 2' | +---------+------+------------------------------------------+ 1 row in set (0.00 sec)