SyntaxFix
Write A Post
Hire A Developer
Questions
I don't think you can achieve that with mysql date. You have to use timestamp or try this approach..
CREATE TRIGGER table_OnInsert BEFORE INSERT ON `DB`.`table` FOR EACH ROW SET NEW.dateColumn = IFNULL(NEW.dateColumn, NOW());