Reputation: 45
I have table: test and field called: id. I want update time (ex. add 2 hours) where id=1000. How to do this?
Upvotes: 2
Views: 4353
Reputation: 125865
UPDATE test SET time = time + INTERVAL 2 HOUR WHERE id = 1000
Using ADDTIME():
ADDTIME()
UPDATE test SET time = ADDTIME(time, '02:00:00') WHERE id = 1000
Upvotes: 7