mysql 时间知多少

Tuesday, October 21st, 2008

讨论一下 在MYSQL中 sysdate() , now() and  current_timestamp() 这三个函数: 其中只有current_timestamp()这个函数才是mysql 的SQL standard 的一部分, 而now()函数在mysql中只是current_timestamp()函数的an alias 而已。 sysdate() is not replication-safe current_timestamp is replication-safe , aslo now() is. mysql> SELECT NOW(), SLEEP(5), NOW(); +---------------------+----------+---------------------+ | NOW() | SLEEP(5) | NOW() ...