时间:2021-07-01 10:21:17 帮助过:5人阅读
数据库外键与索引相关操作 删除外键 www.2cto.com alter table tablename drop foreign key keyname; 添加外键 alter table tablename add constraint foreign key(id) references parent(id); keyname可通过show index from tablename;查询 删除索引 drop i
数据库外键与索引相关操作
删除外键
www.2cto.com
alter table tablename drop foreign key keyname;
添加外键
alter table tablename add constraint foreign key(id) references parent(id);
keyname可通过show index from tablename;查询
删除索引
drop index keyname on tablename