Answers for "how to add default value to datetime column in mysql"

SQL
0

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;
Posted by: Guest on October-26-2021

Code answers related to "how to add default value to datetime column in mysql"

Code answers related to "SQL"

Browse Popular Code Answers by Language