Last active
May 27, 2018 02:25
-
-
Save richard512/13da5d86940b204b4f39ea0d1a6372d5 to your computer and use it in GitHub Desktop.
MySQL Add Auto-Increment Primary Key Column (Unsigned BIGINT) to existing MySQL Table -- Useful when you want a unique identifier for each column
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ALTER TABLE `tablename` ADD COLUMN id BIGINT UNSIGNED AUTO_INCREMENT, ADD PRIMARY KEY `id` (`id`) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment