Reputation: 15374
If I have a column of membership_expiry_date TIMESTAMP
(postgresql) and want to get the current expiry date and add 3 days to it, how would I write this query
UPDATE users SET membership_expiry_date = ??
How do I retrieve the current value and add to it?
Upvotes: 0
Views: 849
Reputation: 51
UPDATE users
SET membership_expiry_date = membership_expiry_date + 3* INTERVAL '1 day'
Upvotes: 1