•When you specify an ENGINE  clause, ALTER TABLE  rebuilds the table. This is true even if the table already has the specified storage engine. 

•Running ALTER TABLE tbl_name  ENGINE=INNODB  on an existing InnoDB  table performs a “null” ALTER TABLE  operation, which can be used to defragment an InnoDB  table, as described in Section 15.11.4, “Defragmenting a Table” . Running ALTER TABLE tbl_name  FORCE  on an InnoDB table performs the same function. 

• ALTER TABLE tbl_name  ENGINE=INNODB  and ALTER TABLE tbl_name  FORCE  use online DDL. For more information, see Section 15.12, “InnoDB and Online DDL” . 

•The outcome of attempting to change the storage engine of a table is affected by whether the desired storage engine is available and the setting of the NO_ENGINE_SUBSTITUTION  SQL mode, as described in Section 5.1.11, “Server SQL Modes” . 

•To prevent inadvertent loss of data, ALTER TABLE  cannot be used to change the storage engine of a table to MERGE  or BLACKHOLE . 

•To change the InnoDB  table to use compressed row-storage format: 

ALTER TABLE t1 ROW_FORMAT = COMPRESSED; 

•The ENCRYPTION  clause enables or disables page-level data encryption for an InnoDB  table. A keyring plugin must be installed and configured to enable encryption. 

If the table_encryption_privilege_check  variable is enabled, the TABLE_ENCRYPTION_ADMIN privilege is required to use an ENCRYPTION  clause with a setting that differs from the default schema encryption setting. 

Prior to MySQL 8.0.16, the ENCRYPTION  clause was only supported when altering tables residing in file-per-table tablespaces. As of MySQL 8.0.16, the ENCRYPTION  clause is also supported for tables residing in general tablespaces. 

For tables that reside in general tablespaces, table and tablespace encryption must match. 

Altering table encryption by moving a table to a different tablespace or changing the storage engine is not permitted without explicitly specifying an ENCRYPTION  clause. 

As of MySQL 8.0.16, specifying an ENCRYPTION  clause with a value other than ’N’  or ’’  is not permitted if the table uses a storage engine that does not support encryption. Previously, the clause was accepted. Attempting to create a table without an ENCRYPTION  clause in an encryption-enabled schema using a storage engine that does not support encryption is also not permitted. 

For more information, see Section 15.13, “InnoDB Data-at-Rest Encryption” . 

•To reset the current auto-increment value: 

ALTER TABLE t1 AUTO_INCREMENT = 13; 

You cannot reset the counter to a value less than or equal to the value that is currently in use. For both InnoDB  and MyISAM , if the value is less than or equal to the maximum value currently in the AUTO_INCREMENT  column, the value is reset to the current maximum AUTO_INCREMENT  column value plus one. 

•To change the default table character set: 

ALTER TABLE t1 CHARACTER SET = utf8; 

