To alter row_format to dynamic in MySQL, following is the syntax:
ALTER TABLE yourTableName ROW_FORMAT=DYNAMIC;
Let us first create a table:
mysql> create table DemoTable ( CustomerId int NOT NULL AUTO_INCREMENT PRIMARY KEY, CustomerName varchar(200), CustomerAge int, CustomerAddress varchar(200) ); Query OK, 0 rows affected (0.73 sec)
Let us check the description of table using DESC command:
mysql> desc DemoTable;
This will produce the following output:
+-----------------+--------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-----------------+--------------+------+-----+---------+----------------+ | CustomerId | int(11) | NO | PRI | NULL | auto_increment | | CustomerName | varchar(200) | YES | | NULL | | | CustomerAge | int(11) | YES | | NULL | | | CustomerAddress | varchar(200) | YES | | NULL | | +-----------------+--------------+------+-----+---------+----------------+ 4 rows in set (0.00 sec)
Following is the query to alter row_format to dynamic:
mysql> alter table DemoTable ROW_FORMAT=DYNAMIC; Query OK, 0 rows affected (1.05 sec) Records: 0 Duplicates: 0 Warnings: 0