Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Default time

See the SQLite Keywords for DEFAULT_TIMESTAMP and other similar keywords.

CREATE TABLE login (
    uid INTEGER NOT NULL,
    logged_in DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP
);

INSERT INTO login (uid) VALUES (1);
INSERT INTO login (uid, logged_in) VALUES (2, '2026-04-29 08:06:36');

SELECT * from login;
$ sqlite3 < examples/default-time.sql
1|2026-05-05 06:28:37
2|2026-04-29 08:06:36