How do I alter a timestamp to set by default to the current time?
The code below doesn't seem to work even though the collumn and table does exist, any ideas?
ALTER开发者_C百科 TABLE `table` CHANGE 'collumn_1' 'collumn_1' TIMESTAMP DEFAULT 'CURRENT_TIMESTAMP' NOT NULL
I'm just trying to make the collumn available so it can store the current date and time when any data is added to this table.
ALTER TABLE `table` MODIFY collumn_1 TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL;
精彩评论