思路话语

。Arlen:思想有多远你就能走多远...

mysql sql 修改表名 建立外键 修改列名 删除列

--重命名表
rename table t_softwareport to software_port;

--建立外键
alter table software_port add constraint fk_software_port_softwareprocessid foreign key (softwareprocessid)
      references software_process (id) on delete restrict on update restrict;

--删除列
alter table software_type
drop column upid,
drop column orderid;

--修改列名
alter table software_process change  software_id  softwareid  int(11) not null;

posted on 2008-01-25 15:26  Arlen  阅读(5314)  评论(1编辑  收藏  举报

导航