Answers for "update created on date with current date in mysql"

SQL
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
2

insert current date in mysql

INSERT INTO my_table (last_updated) VALUES(NOW());
INSERT INTO my_table (last_updated) VALUES(sysdate);	-- Oracle
INSERT INTO my_table (last_updated) VALUES(getdate());	-- SQL Server
Posted by: Guest on April-05-2021
1

on update date mysql

ALTER TABLE t1 MODIFY post_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
Posted by: Guest on April-26-2021

Code answers related to "update created on date with current date in mysql"

Code answers related to "SQL"

Browse Popular Code Answers by Language