
- Learn MySQL
- MySQL - Home
- MySQL - Introduction
- MySQL - Installation
- MySQL - Administration
- MySQL - PHP Syntax
- MySQL - Connection
- MySQL - Create Database
- MySQL - Drop Database
- MySQL - Select Database
- MySQL - Data Types
- MySQL - Create Tables
- MySQL - Drop Tables
- MySQL - Insert Query
- MySQL - Select Query
- MySQL - Where Clause
- MySQL - Update Query
- MySQL - Delete Query
- MySQL - Like Clause
- MySQL - Sorting Results
- MySQL - Using Join
- MySQL - NULL Values
- MySQL - Regexps
- MySQL - Transactions
- MySQL - Alter Command
- MySQL - Indexes
- MySQL - Temporary Tables
- MySQL - Clone Tables
- MySQL - Database Info
- MySQL - Using Sequences
- MySQL - Handling Duplicates
- MySQL - SQL Injection
- MySQL - Database Export
- MySQL - Database Import
Alter row_format to dynamic in MySQL?
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
- Related Articles
- Adding unique constraint to ALTER TABLE in MySQL
- Alter a MySQL column to be AUTO_INCREMENT?
- How to add column using alter in MySQL?\n
- ALTER table by adding AUTOINCREMENT in MySQL?
- ALTER TABLE to add a composite primary key in MySQL?
- Alter a table column from VARCHAR to NULL in MySQL
- How to alter multiple columns in a single statement in MySQL?
- Can we alter order of columns in MySQL?
- MySQL ALTER column to remove primary key and auto_increment?
- How can we alter a MySQL stored procedure?
- How can we alter a MySQL stored function?
- How to alter column type of multiple columns in a single MySQL query?
- How to alter a MySQL Column from varchar(30) to varchar(100)?
- How can we alter table to add MySQL virtual GENERATED COLUMNS?
- How can we alter table to add MySQL stored GENERATED COLUMNS?

Advertisements