Answer the question
In order to leave comments, you need to log in
How to update timestamp field in PostgreSQL table?
In the table, each user has a lastLogin field, the timestamp data type, how to update this field each time the user logs in? I try like this -
'UPDATE users SET lastLogin = timestamp with time zone WHERE email = email is not updated
Answer the question
In order to leave comments, you need to log in
For example like this:
UPDATE users
SET lastLogin = CURRENT_TIMESTAMP
WHERE email = '[email protected]'
;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question