How do you set a default value for a MySQL Datetime column?
In SQL Server it\'s getdate(). What is the equivalant for MySQL? I\'m using MySQL 5.x if tha
getdate()
Use the following code
DELIMITER $$ CREATE TRIGGER bu_table1_each BEFORE UPDATE ON table1 FOR EACH ROW BEGIN SET new.datefield = NOW(); END $$ DELIMITER ;