How does MySQL get the current time and timestamp
This article mainly introduces MySQL how to obtain the current time and timestamp related knowledge, the content is detailed and easy to understand, the operation is simple and fast, has a certain reference value, I believe that everyone will have a harvest after reading this MySQL how to obtain the current time and timestamp article, let's take a look at it.
1, get the current date + time (date + time) function: now()
MySQL> select now();+-------+| now() |+-------+| 2013-04-08 20:56:19 |+-------+
In addition to the now() function, which can get the current date and time, MySQL also has the following functions:
current_timestamp(),current_timestamp,localtime(),localtime,localtimestamp() - (v4.0.6)MySQL timestamp function
MySQL gets the current timestamp function: 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 |+-------------- I believe everyone has a certain understanding of "MySQL how to obtain the current time and timestamp" knowledge. If you still want to learn more knowledge, please pay attention to the industry information channel.