April 2013
Intermediate to advanced
1276 pages
42h 16m
English
TIMESTAMP and DATETIME columns can have automatic initialization and update properties:
• “Automatic initialization” means that for new rows the column is set to the current timestamp if you omit it from the INSERT statement.
• “Automatic update” means that for existing rows the column is updated to the current timestamp when you change any other column to a different value. (Setting a column to its current value does not count; this can in fact be done to prevent automatic updates.)
Before MySQL 5.6.5, you can designate any single TIMESTAMP column in a table to have either or both of those properties. You cannot have automatic initialization for one TIMESTAMP column and automatic update for another. ...
Read now
Unlock full access