Home > Database > Mysql Tutorial > body text

How to get the current time in mysql

醉折花枝作酒筹
Release: 2021-05-19 09:47:23
forward
3434 people have browsed it

This article will introduce to you how to get the current time in mysql. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to everyone.

How to get the current time in mysql

1. current_timestamp

##2. current_time

3.current_data

4. now()

##5. curdate()

6.curtime()

Insert the current time into the database

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

Related recommendations: "

mysql tutorial

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

Related labels:
source:csdn.net
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template