Zmień tabelę
ALTER TABLE table_name MODIFY COLUMN column_name datatype;
Bright Buffalo
ALTER TABLE table_name MODIFY COLUMN column_name datatype;
ALTER TABLE table_name MODIFY column_name datatype NOT NULL;
ALTER TABLE table_name
ADD CONSTRAINT MyPrimaryKey PRIMARY KEY (column1, column2...);
ALTER TABLE table_name
DROP PRIMARY KEY;
ALTER TABLE table_name
ADD CONSTRAINT MyUniqueConstraint UNIQUE(column1, column2...);
ALTER TABLE table_name
DROP INDEX MyUniqueConstraint;
ALTER TABLE table_name
ADD CONSTRAINT MyUniqueConstraint CHECK (CONDITION);
ALTER TABLE table_name
DROP CONSTRAINT MyUniqueConstraint;