改數據庫的字段名以及外鍵的生成和刪除

如何更改表1中的字段1爲字段2 alter table 表1 change 字段1 字段2 int unsigned not null; 如何將表1中的字段1設置爲外鍵關聯表2 alter table 表1 add foreign key (字段1) references 表2(id); 做了這麼多怎查看錶的外鍵關聯呢。 使用命令查看外鍵的約束(constraint) show create ta
相關文章
相關標籤/搜索