this is a table structure
id int
name varchar
insert_date date
update_date TIMESTAMP
Now here is idia, insert_date will be able to insert at the current time, and update_date will insert the current time in each edit or insert, it will update it.
since I could make the default value (insert_date) the current time and date, but when updating it should not change the value (insert_date), if I keep it TIMESTAMP when updating, it will change.
insert_date - insert the current time, only insert only once
considers
source
share