mysql now函数在sql语句中多次引用

发布时间:2020-02-24编辑:脚本学堂
本文介绍了mysql now函数的一个例子,在一条sql语句中多次引用now函数,显示相同的时间,感兴趣的朋友参考下.

例子,mysql sum函数用法举例。
Multiple references to a function such as NOW() within a single query always produce the same result

sql语句 如下:
 

mysql>
This principle also applies to CURDATE(), CURTIME(), UTC_DATE(), UTC_TIME(), UTC_TIMESTAMP(), and to any of their synonyms.
mysql>
mysql> select now(), now();
+---------------------+---------------------+
| now()               | now()               |
+---------------------+---------------------+
| 2007-07-22 19:46:01 | 2007-07-22 19:46:01 |
+---------------------+---------------------+
1 row in set (0.00 sec)