CURDATE()
返回当前日期为'YYYY-MM-DD“或YYYYMMDD格式的值,根据该函数是否用在字符串或数字语境中。
mysql> SELECT CURDATE(); +---------------------------------------------------------+ | CURDATE() | +---------------------------------------------------------+ | 1997-12-15 | +---------------------------------------------------------+ 1 row in set (0.00 sec) mysql> SELECT CURDATE() + 0; +---------------------------------------------------------+ | CURDATE() + 0 | +---------------------------------------------------------+ | 19971215 | +---------------------------------------------------------+ 1 row in set (0.00 sec)