content_image/831412.jpg
<img src='content_image/831412.jpg'>

## Syntax and Usage Notes 

•Adding a column 

ALTER TABLE tbl_name  ADD COLUMN column_name column_definition , ALGORITHM=INSTANT; 

The following limitations apply when the INSTANT  algorithm is used to add a column: 

•Adding a column cannot be combined in the same statement with other ALTER TABLE  actions that do not support ALGORITHM=INSTANT . 

•A column can only be added as the last column of the table. Adding a column to any other position among other columns is not supported. 

•Columns cannot be added to tables that use ROW_FORMAT=COMPRESSED . 

•Columns cannot be added to tables that include a FULLTEXT  index. 

•Columns cannot be added to temporary tables. Temporary tables only support ALGORITHM=COPY . 

•Columns cannot be added to tables that reside in the data dictionary tablespace. 

•Row size limits are not evaluated when adding a column. However, row size limits are checked during DML operations that insert and update rows in the table. 

Multiple columns may be added in the same ALTER TABLE  statement. For example: 

ALTER TABLE t1 ADD COLUMN c2 INT, ADD COLUMN c3 INT, ALGORITHM=INSTANT; 

INFORMATION_SCHEMA.INNODB_TABLES  and INFORMATION_SCHEMA.INNODB_COLUMNS  provide metadata for instantly added columns. INFORMATION_SCHEMA.INNODB_TABLES.INSTANT_COLS shows number of columns in the table prior to adding the first instant column. 

