ALTER TABLE `table_name` ADD COLUMN `id` INT AUTO_INCREMENT UNIQUE FIRST;
ALTER TABLE tbname MODIFY COLUMN columname smallint(5) auto_increment
ALTER TABLE foobar AUTO_INCREMENT=10;
ALTER TABLE tbl_access ADD COLUMN `access_id` int(10) NOT NULL PRIMARY KEY AUTO_INCREMENT FIRST
CREATE TABLE IF NOT EXISTS blog_users (
id INT NOT NULL AUTO_INCREMENT,
email VARCHAR(255) NOT NULL,
password VARCHAR(255) NOT NULL,
PRIMARY KEY (id)
)
SET @auto_increment=0;
SELECT @auto_increment := @auto_increment+1 AS `No`;
SELECT `AUTO_INCREMENT`
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_SCHEMA = 'DatabaseName'
AND TABLE_NAME = 'TableName';