PRIMARY Key (PK) identifies the field as the primary key of the table and can uniquely identify the record foreign key (FK) identifies the field as the foreign key of the table not null identity The field cannot be empty unique key (UK) The value that identifies the field is unique auto_increment the value of the field is automatically grown (integer type, and the primary key) default for this field is set to the defaults unsigned unsigned zerofill using 0 padding
1. Allow null, default NULL, set not NULL, field not allowed to be empty, must be assigned a value of 2. The default value for thefield is NULL, and if the record is inserted without assigning a value to the field, this field uses the default value of the Sex enum ( ' male ','female' not'male'20 must be positive (unsigned) does not allow null default is3. Is the key primary key primary key foreign key foreign key index (Index,unique ...)
Integrity constraints of the database