Skip to content

Instantly share code, notes, and snippets.

@rettal
Created April 7, 2015 22:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rettal/32eb3d58ade54ac37952 to your computer and use it in GitHub Desktop.
Save rettal/32eb3d58ade54ac37952 to your computer and use it in GitHub Desktop.
update log_data SET `timestamp` = `timestamp` + INTERVAL 1 DAY WHERE id >= 1000 LIMIT 1000;
SELECT datetime + INTERVAL 10 YEAR + INTERVAL 3 MONTH + INTERVAL 22 DAY
+ INTERVAL 10 HOUR + INTERVAL 30 MINUTE AS new_date_time FROM table;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment