Databases · Junior · Question 69 of 75
What does created_at timestamptz NOT NULL DEFAULT now() do?
- 1Updates
created_aton every change of the row - ✓Correct answer: If an insert doesn't provide
created_at, the database fills in the current time - 3Forbids inserting rows created in the past
Explanation
Defaults apply only on insert. Tracking updated_at on every change needs application code or a trigger.