Roland Turner

about | contact

Auto-default _AND_ auto-update for MySQL TIMESTAMP columns

The CREATE TABLE docs don’t mention this:

ts TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP

it’s buried in the data types docs. Neat.