using ON CREATION with CURRENT_TIMESTAMP
I am trying to create a column that gets a timestamp() or DATETIME the field keeps changing when. I did get it to stick with DATE and on row creation date. I have seen a number of posts but mysqlworkbench is not working as advertised.
When I try to modify a column to timestamp and DEFAULT CURRENT_TIMESTAMP I get this error- Operation failed: There was an error while applying the SQL script to the database.
ERROR 1067: Invalid default value for 'last_date_modified'
SQL Statement:
ALTER TABLE `substantiator`.`images2`
CHANGE COLUMN `last_date_modified` `last_date_modified` DATETIME NULL DEFAULT 'CURRENT_TIMESTAMP'.
Is there something else I need to do? I don't see where to set ON CREATION.
Subject
Written By
Posted
using ON CREATION with CURRENT_TIMESTAMP
January 04, 2023 05:52AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.