I would like to insert TIMESTAMP into column LAST_LOGIN
CREATE TABLE USER(
ID INTEGER NOT NULL,
USER_NAME TEXT,
FIRST_NAME TEXT,
LAST_NAME TEXT,
LAST_LOGIN DATE,
DATE_REGISTERED DATE,
ROLE INTEGER,
CAN_LOGIN INTEGER
)
;
ALTER TABLE USER ADD CONSTRAINT KEY1 PRIMARY KEY (ID)
;
I tried this:
UPDATE USERS SET LAST_LOGIN = TIMESTAMP WHERE USER_NAME = ?
But I get org.postgresql.util.PSQLException: ERROR: column "timestamp" does not exist Position: 31
What is the correct way to insert current time into table column LAST_LOGIN?