Home  >  Article  >  Database  >  How to express the current time in mysql

How to express the current time in mysql

coldplay.xixi
coldplay.xixiOriginal
2020-11-02 15:58:328664browse

Methods to represent the current time in mysql: 1. Use the [current_timestamp] method; 2. Use the [current_time] method; 3. Use the [current_data] method; 4. Use the [now()] method; 5. Use [curdate()] method.

How to express the current time in mysql

Method to represent mysql current time:

1, current_timestamp

How to express the current time in mysql

2, current_time

How to express the current time in mysql

##3, current_data

How to express the current time in mysql

4, now()

How to express the current time in mysql

5. curdate()

How to express the current time in mysql

6. curtime()

How to express the current time in mysql

Insert the current time into the database

insert into t_login(user_id,login_time) values (1,CURRENT_TIMESTAMP);

Related free learning recommendations:

mysql video tutorial

The above is the detailed content of How to express the current time in mysql. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn