ALTER [IGNORE] TABLE
Use this statement to change an existing table’s structure and other properties. A table may be altered with this statement in the following ways:
Add a new column (see the ALTER TABLE: ADD clauses for columns” subsection that follows)
Add a foreign key constraint (see the ALTER TABLE: ADD clauses for foreign keys” subsection)
Change an existing column (see the ALTER TABLE: CHANGE clauses” subsection)
Set other column and index factors (see the ALTER TABLE: Miscellaneous clauses” subsection)
Set table-wide options (see the ALTER TABLE: Table options” subsection)
IGNORE flag applies to all clauses and
instructs MySQL to ignore any error messages regarding duplicate rows
that may occur as a result of a column change. It will keep the first
unique row found and drop any duplicate rows. Otherwise, the statement
will be terminated and changes will be rolled back.
This statement requires the
for the table being altered, at a minimum. While an
TABLE statement ...