Skip to content

Instantly share code, notes, and snippets.

@naranjja
Created December 26, 2016 19:53
Show Gist options
  • Save naranjja/5eb765fbe692130891b4572faa677019 to your computer and use it in GitHub Desktop.
Save naranjja/5eb765fbe692130891b4572faa677019 to your computer and use it in GitHub Desktop.
Add columns to existing tables
ALTER TABLE `tableName` ADD COLUMN `columnName` columnType
/* Example */
ALTER TABLE names ADD COLUMN `lastName` varchar(255) NOT NULL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment