Home > Database > Mysql Tutorial > body text

mysql的几个alter tabl命令(备忘)_MySQL

WBOY
Release: 2016-05-31 08:47:10
Original
1148 people have browsed it

删除外键:

alter table `itrip_shop` drop FOREIGN KEY `FK_ayixnihiit0pouq70l8ig0ax9`;


删除唯一键:

alter table `itrip_shop` drop index `UK_ayixnihiit0pouq70l8ig0ax9`;


添加外键约束(复杂选项版):

alter table `itrip_shop` ADD CONSTRAINT `FK_ayixnihiit0pouq70l8ig0ax9` FOREIGN KEY `FK_ayixnihiit0pouq70l8ig0ax9` (`shop_admin`) REFERENCES `itrip_user` (`user_id`);

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template