Answers for "mysql update table to create timestamp field"

SQL
0

mysql sql add created updated timestamp to existing table

ALTER TABLE t1
ADD COLUMN created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
ADD COLUMN updated_at DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
Posted by: Guest on September-19-2020
0

mysql on update current_timestamp

Press CTRL+C to copy CREATE TABLE t1 (
  ts TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  dt DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
);
Posted by: Guest on August-30-2020

Code answers related to "mysql update table to create timestamp field"

Code answers related to "SQL"

Browse Popular Code Answers by Language