UPDATE without changing the date of a record

2

How do I change a record in my table and keep the date the record was created.

In% with% I'm using the INSERT method. When I use a now() to change only one column the date is being changed, and I need to keep the date the record was created, I tested first on UPDATE and then on my application, in both ways the date is being altered.

    
asked by anonymous 03.04.2017 / 08:48

1 answer

3

Your table should have a column with the attribute:

ON UPDATE CURRENT_TIMESTAMP

Remove the column attribute and any updates in your table will not change the date / time in the column.

    
03.04.2017 / 13:59