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

Detailed tutorial on deploying Django project using Docker on centos8

introduction In this article, we will introduce h...

In-depth understanding of React Native custom routing management

Table of contents 1. Custom routing 2. Tab naviga...

Introduction to container of() function in Linux kernel programming

Preface In Linux kernel programming, you will oft...

WeChat applet implements search function and jumps to search results page

Search Page: search.wxml page: <view class=&qu...

MySql 5.6.35 winx64 installation detailed tutorial

Note: There was no error in the project startup d...

The latest virtual machine VMware 14 installation tutorial

First, I will give you the VMware 14 activation c...

Write a formal blog using XHTML CSS

The full name of Blog should be Web log, which mea...

How to use lodop print control in Vue to achieve browser compatible printing

Preface This control will have a watermark at the...

How to choose the right index in MySQL

Let’s take a look at a chestnut first EXPLAIN sel...

Using group by in MySQL always results in error 1055 (recommended)

Because using group by in MySQL always results in...

Steps to transfer files and folders between two Linux servers

Today I was dealing with the issue of migrating a...

Steps to build a file server using Apache under Linux

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