Skip to content

Instantly share code, notes, and snippets.

@sephraim
Last active November 11, 2016 22:43
Show Gist options
  • Save sephraim/0d1f1d19d581a2361a4af751b28c7608 to your computer and use it in GitHub Desktop.
Save sephraim/0d1f1d19d581a2361a4af751b28c7608 to your computer and use it in GitHub Desktop.
Add column to MySQL database
ALTER TABLE `__TABLE__`
ADD `__COL__`
VARCHAR(255) NULL
DEFAULT NULL
COMMENT '__COMMENT__'
AFTER `__ANOTHER_COL__` ;

Instead of using the 'AFTER' option, you can also use the 'FIRST' option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment