Add autoincremeting (Primary key) id column

In this very simple example we will see how to add a column named id to a table. This table with be the primary key and will be autoincremeting.

ALTER TABLE `db`.`table` ADD `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY