MySQL Forums
Forum List  »  MySQL Workbench

Re: How to set TIMESTAMP and DATETIME in workbench
Posted by: Miguel Tadeu
Date: September 05, 2017 03:36AM

Hi Pete,

In Workbench, set the DATE_CREATED column to DATETIME and the default value to CURRENT_TIMESTAMP.
As for the DATE_UPDATED, if you want it automatically updated, you hsould create a trigger for that table. To do so, go to the "Triggers" tab when editing the table. You should set one before/after update and update the DATE_UPDATED column with CURRENT_TIMESTAMP or using the now() function.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: How to set TIMESTAMP and DATETIME in workbench
30856
September 05, 2017 03:36AM


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.