Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - How does mysql add a field and set the added field as the primary key?
How does mysql add a field and set the added field as the primary key?
ALTER TABLE table name ADD (field name type) constrains the name of the primary key;

or

TABLE table table name ADD (field name type);

ALTER TABLE table name adds the name (field name) of the constraint primary key;