ALTER TABLE `paylist`
DROP PRIMARY KEY,
ADD PRIMARY KEY(`id`),
CHANGE COLUMN payment_method payment_method varchar(20) NULL AFTER supplier_id,
CHANGE COLUMN supplier_id supplier_id varchar(32) NULL AFTER property_number;
上述规则给出了错误:错误:'paylist'中的未知列'supplier_id'。但它们可以在separte statment中运行。例如。
ALTER TABLE `paylist` CHANGE COLUMN payment_method payment_method varchar(20) NULL AFTER supplier_id;
和
ALTER TABLE `paylist` CHANGE COLUMN supplier_id supplier_id varchar(32) NULL AFTER property_number;