Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- UPDATE d.timestamp_manipulation_experiments
- SET `timestamp` = `timestamp` + '0001-01-01 01:01:01' WHERE id = 2;
- SELECT * FROM d.timestamp_manipulation_experiments;
- -- add 2 Minutes and 1 Second to the current timestamp and look at the result
- UPDATE d.timestamp_manipulation_experiments
- SET `timestamp` = DATE_ADD(`timestamp`, INTERVAL '2:1' MINUTE_SECOND) WHERE id = 2;
- SELECT * FROM d.timestamp_manipulation_experiments WHERE id = 2;
- -- add 1 week to the current timestamp and look at the result
- UPDATE d.timestamp_manipulation_experiments
- SET `timestamp` = TIMESTAMPADD(WEEK,1,`timestamp`) WHERE id = 2;
- SELECT * FROM d.timestamp_manipulation_experiments WHERE id = 2;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement