Skip to content

Instantly share code, notes, and snippets.

@jawdatls
Created November 2, 2015 07:02
Show Gist options
  • Save jawdatls/eca447a599159c9f7f59 to your computer and use it in GitHub Desktop.
Save jawdatls/eca447a599159c9f7f59 to your computer and use it in GitHub Desktop.
mysql query to update only month in date
UPDATE `tbl`
SET `date` = DATE_ADD(`date`, INTERVAL -1 MONTH)
WHERE MONTH(`date`) = 11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment