标签:mysql after first 指定位置 add column
ALTER TABLE test ADD COLUMN id INT UNSIGNED NOT NULL auto_increment PRIMARY KEY FIRST
ALTER TABLE table_name ADD [COLUMN] col_name column_definition [ FIRST | AFTER col_name]
DROP TABLE IF EXISTS `test`; CREATE TABLE `test` ( `a` int(11) NOT NULL, `b` varchar(200) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
ALTER TABLE test ADD COLUMN c INT NOT NULL AFTER a
ALTER TABLE test ADD COLUMN id INT UNSIGNED NOT NULL auto_increment PRIMARY KEY FIRST
标签:mysql after first 指定位置 add column
原文地址:http://blog.csdn.net/seven_3306/article/details/39051493