How MySQL modifies a table to add more than one column at a time of fields and indexes

  • 2021-06-28 09:50:20
  • OfStack

MySQL modifies Table 1 to add multiple columns (fields) at a time

ALTER TABLE table_name ADD func varchar(50), ADD gene varchar(50), ADD genedetail varchar(50);


MySQL modifies Table 1 to add multiple indexes at a time

ALTER TABLE table_name ADD INDEX idx1 ( `func`), ADD INDEX idx2 ( `func`,`gene`), ADD INDEX idx3( `genedetail`);


Related articles: