Tables To create an  InnoDB  table in a general tablespace, use  CREATE TABLE ... TABLESPACE  syntax. For more information, see Section 15.6.3, “Tablespaces” . The row format of an  InnoDB  table determines how its rows are physically stored on disk.  InnoDB supports four row formats, each with different storage characteristics. Supported row formats include REDUNDANT ,  COMPACT ,  DYNAMIC , and  COMPRESSED . The  DYNAMIC  row format is the default. For information about row format characteristics, see Section 15.10, “InnoDB Row Formats” . The  innodb_default_row_format  variable defines the default row format. The row format of a table can also be defined explicitly using the  ROW_FORMAT  table option in a  CREATE TABLE  or  ALTER TABLE statement. See Defining the Row Format of a Table. It is recommended that you define a primary key for each table that you create. When selecting primary key columns, choose columns with the following characteristics: •Columns that are referenced by the most important queries. •Columns that are never left blank. •Columns that never have duplicate values. •Columns that rarely if ever change value once inserted. For example, in a table containing information about people, you would not create a primary key on (firstname, lastname)  because more than one person can have the same name, a name column may be left blank, and sometimes people change their names. With so many constraints, often there is not an obvious set of columns to use as a primary key, so you create a new column with a numeric ID to serve as all or part of the primary key. You can declare an auto-increment column so that ascending values are filled in automatically as rows are inserted: Although a table works correctly without defining a primary key, the primary key is involved with many aspects of performance and is a crucial design aspect for any large or frequently used table. It is recommended that you always specify a primary key in the  CREATE TABLE  statement. If you create the table, load data, and then run  ALTER TABLE  to add a primary key later, that operation is much slower than defining the primary key when creating the table. For more information about primary keys, see Section 15.6.2.1, “Clustered and Secondary Indexes” . For more information about auto-increment columns, see Section 15.6.1.6, “AUTO_INCREMENT Handling in InnoDB” . # The value of ID can act like a pointer between related items in different tables. CREATE TABLE t5 (id INT AUTO_INCREMENT, b CHAR (20), PRIMARY KEY (id)); # The primary key can consist of more than one column. Any autoinc column must come first. CREATE TABLE t6 (id INT AUTO_INCREMENT, a INT, b CHAR (20), PRIMARY KEY (id,a)); mysql>  SHOW TABLE STATUS FROM test LIKE ’t%’ \G; *************************** 1. row *************************** Name: t1 Engine: InnoDB Version: 10 Row_format: Dynamic Viewing InnoDB Table Properties To view the properties of an  InnoDB  table, issue a  SHOW TABLE STATUS  statement: 3017 Primary Keys Row Formats