Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

mysql update column default value CURRENT_TIMESTAMP error

# Best case you can do is drop the column and recreate it with the set timestamp;
ALTER TABLE `TABLE_NAME` DROP COLUMN `COLUMN_NAME`;
ALTER TABLE `TABLE_NAME` ADD COLUMN `COLUMN_NAME` TIMESTAMP DEFAULT CURRENT_TIMESTAMP;
 
PREVIOUS NEXT
Tagged: #mysql #update #column #default #error
ADD COMMENT
Topic
Name
8+1 =