laika222
10/24/2016 - 9:00 PM

In mysql, creates a column called Create, which is of the type TIMESTAMP, and which defaults to a value of the current TIMESTAMP (whenever i

In mysql, creates a column called Create, which is of the type TIMESTAMP, and which defaults to a value of the current TIMESTAMP (whenever it's entered). Each time you update any column in the row, the Modified column will update with the CURRENT_TIMESTAMP. Apparently each table can only have one column with a TIMESTAMP column set to default to Current_Timestamp?)

ALTER TABLE people2 
    ADD COLUMN Modified TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;