#1 删除非空约束 ALTER TABLE stuinfo MODIFY COLUMN stuname VARCHAR(20) NULL; #2 删除默认约束 ALTER TABLE stuinfo MODIFY COLUMN age INT; #3 删除主键 ALTER TABLE stuinfo DROP PRIMARY KEY; #4 删除唯一 ALTER TABLE stuinfo DROP INDEX; #5 删除外键 ALTER TABLE stuinfo DROP FOREIGN KEY fk_stuinfo_major;
标签:删除,DROP,表时,约束,stuinfo,MySQL,TABLE,ALTER From: https://www.cnblogs.com/yzhone/p/16866406.html