Several ways to add timestamps in MySQL tables

Several ways to add timestamps in MySQL tables

Scenario:

The data in a table needs to be synchronized to other databases using a synchronization tool, and the update_time timestamp field is required for incremental synchronization.

Solution:

alter table quant_stk_calc_d_wxcp add update_time timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP; 

The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM.

You may also be interested in:
  • Detailed explanation of TIMESTAMP usage in MySQL
  • Analysis of a murder case caused by MySQL timestamp accuracy
  • Usage of mysql timestamp
  • MySQL data insertion overwrite and timestamp issues and solutions

<<:  Implementation of webpack-dev-server to build a local server

>>:  Tutorial on installing DAMO database on Centos7

Recommend

Steps to build a file server using Apache under Linux

1. About the file server In a project, if you wan...

How to run MySQL using docker-compose

Directory Structure . │ .env │ docker-compose.yml...

Detailed explanation of MySQL index selection and optimization

Table of contents Index Model B+Tree Index select...

A brief discussion on Flink's fault-tolerant mechanism: job execution and daemon

Table of contents 1. Job Execution Fault Toleranc...

How to build YUM in Centos7 environment

1. Enter the configuration file of the yum source...

A brief discussion on which fields in Mysql are suitable for indexing

Table of contents 1 The common rules for creating...

Solution to nginx hiding version number and WEB server information

Nginx can not only hide version information, but ...

Detailed explanation of docker command to backup linux system

tar backup system sudo tar cvpzf backup.tgz --exc...

Summary of JavaScript custom object methods

Table of contents 1. Use object to create an obje...

mySql SQL query operation on statistical quantity

I won't say much nonsense, let's just loo...

Detailed explanation of FTP environment configuration solution (vsftpd)

1. Install vsftpd component Installation command:...

Detailed Example of MySQL InnoDB Locking Mechanism

1. InnoDB locking mechanism The InnoDB storage en...

Create a movable stack widget function using flutter

This post focuses on a super secret Flutter proje...