Skip to content

Latest commit

 

History

History
14 lines (10 loc) · 343 Bytes

default_now_for_date.md

File metadata and controls

14 lines (10 loc) · 343 Bytes

Defaulting to now for date

It can be useful to have dates default to now when inserting records.

CREATE TABLE test (
  id INTEGER PRIMARY KEY AUTOINCREMENT,
  t TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

References