- 相關(guān)推薦
mysql SQL語(yǔ)句積累參考
--重命名表
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 restrict on restrict;
--刪除列
alter table software_type drop column upid, drop column orderid;
--修改列名
alter table software_process change software_id softwareid int(11) not null;
--更改列編碼
alter table cms_contentbody modify column offical_site_name var30) character set utf8 collate utf8_unicode_ci not null;
--增加列
alter table cms_flash add name var30) not null unique;
【mysql SQL語(yǔ)句積累參考】相關(guān)文章:
MySQL導(dǎo)出導(dǎo)入SQL文件命令方法03-30
oracle的sql語(yǔ)句01-21
SQL語(yǔ)句的理解原則03-30
SQL查詢(xún)語(yǔ)句大全04-25
SQL語(yǔ)句中的正則表達(dá)示03-18
SQL優(yōu)化大全03-08