mysqlÔõôÁÔÈ¡Ä¿Ç°¹¤·ò
mysqlÁÔÈ¡Ä¿Ç°¹¤·òµÄ°ì·¨£º¿ÉÒÔͨ¹ýÊ©ÐС¾select now();¡¿Óï¾äÀ´ÁÔÈ¡Ä¿Ç°¹¤·ò¡£»¹¿ÉÒÔͨ¹ýÊ©ÐС¾select current_timestamp, current_timestamp();¡¿Óï¾äÀ´ÁÔÈ¡¡£
»ñµÃÄ¿Ç°ÈÕÆÚ+¹¤·ò£¨date + time£©º¯Êý£ºnow()
£¨¾Ù¼ö½Ì³Ì£ºmysqlÊÓƵ½Ì³Ì£©
mysql> select now(); +---------------------+ | now() | +---------------------+ | 2008-08-08 22:20:46 | +---------------------+
»ñµÃÄ¿Ç°ÈÕÆÚ+¹¤·ò£¨date + time£©º¯Êý£ºsysdate()
sysdate() ÈÕÆÚ¹¤·òº¯Êý¸ú now() ÏàËÆ£¬²»Ò»ÑùÖ®´¦ÔÚÓÚ£ºnow() ÔÚÊ©Ðпª¶Ëʱֵ¾ÍµÃµ½ÁË£¬ sysdate() ÔÚº¯ÊýÊ©ÐÐʱ¶¯Ì¬µÃµ½Öµ¡£¿´ÏÂÃæµÄÀý×Ó¾ÍÃ÷È·ÁË£º
mysql> select now(), sleep(3), now(); +---------------------+----------+---------------------+ | now() | sleep(3) | now() | +---------------------+----------+---------------------+ | 2008-08-08 22:28:21 | 0 | 2008-08-08 22:28:21 | +---------------------+----------+---------------------+
MySQL »ñµÃÄ¿Ç°¹¤·ò´Áº¯Êý£ºcurrent_timestamp, current_timestamp()
mysql> select current_timestamp, current_timestamp(); +---------------------+---------------------+ | current_timestamp | current_timestamp() | +---------------------+---------------------+ | 2008-08-09 23:22:24 | 2008-08-09 23:22:24 | +---------------------+---------------------+
¸ÐлÄúµÄÖ§³Ö£¬ÎÒ»á¼ÌÐøŬÁ¦µÄ!
´ò¿ªÖ§¸¶±¦É¨Ò»É¨£¬¼´¿É½øÐÐɨÂë´òÉÍŶ
°Ù·Ö°ÙÔ´ÂëÍø ½¨Òé´òÉÍ1¡«10Ôª£¬ÍÁºÀËæÒ⣬¸ÐлÄúµÄÔĶÁ£¡