mysql> select now(); #获取当前的日期和时间 +---------------------+ | now() | +---------------------+ | -- :: | +---------------------+ row in set (0.05 sec) mysql> select curdate(); #获取当前的日期 +------------+ | curdate() | +------------+ | -- | +------------+ row in set (0.00 sec) mysql> select curtime(); #获取当前的时间 +-----------+ | curtime() | +-----------+ | :: | +-----------+ row in set (0.00 sec) mysql>