I am trying to build an sqlite db, and having timestamp as one of the columns.
This is my structure:
CREATE TABLE logs (
log_id INTEGER PRIMARY KEY AUTOINCREMENT,
log_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
error_text TEXT
)
but when I am inserting into the table the log_date
field remain blank:
INSERT INTO logs(error_text)VALUES("some error text")
What am I doing wrong?