SQL ADDTIME()函數
ADDTIME(expr1,expr2)
ADDTIME()將expr2到expr1並返回結果。expr1是一個時間或日期時間表達式,expr2是一個時間表達式。
mysql> SELECT ADDTIME('1997-12-31 23:59:59.999999','1 1:1:1.000002'); +---------------------------------------------------------+ | DATE_ADD('1997-12-31 23:59:59.999999','1 1:1:1.000002') | +---------------------------------------------------------+ | 1998-01-02 01:01:01.000001 | +---------------------------------------------------------+ 1 row in set (0.00 sec)