mysql SQL語(yǔ)句積累
更新時(shí)間:2011年09月15日 00:02:44 作者:
mysql SQL語(yǔ)句積累,學(xué)習(xí)mysql的朋友可以參考下。
--重命名表
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;
--更改列編碼
alter table cms_contentbody modify column offical_site_name varchar(30) character set utf8 collate utf8_unicode_ci not null;
--增加列
alter table cms_flash add name varchar(30) not null unique;
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;
--更改列編碼
alter table cms_contentbody modify column offical_site_name varchar(30) character set utf8 collate utf8_unicode_ci not null;
--增加列
alter table cms_flash add name varchar(30) not null unique;
相關(guān)文章
mysql從一張表查詢批量數(shù)據(jù)并插入到另一表中的完整實(shí)例
這篇文章主要給大家介紹了關(guān)于mysql從一張表查詢批量數(shù)據(jù)并插入到另一表中的相關(guān)資料,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧2021-01-01
mysql數(shù)據(jù)庫(kù)基本語(yǔ)法及操作大全
這篇文章主要介紹了mysql數(shù)據(jù)庫(kù)基本語(yǔ)法及操作大全,本文給大家介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下2021-04-04
安裝配置Zabbix來(lái)監(jiān)控MySQL的基本教程
這篇文章主要介紹了安裝配置Zabbix來(lái)監(jiān)控MySQL的基本教程,Zabbix擁有web頁(yè)面端顯示數(shù)據(jù)的功能,文中的安裝環(huán)境為CentOS系統(tǒng),需要的朋友可以參考下2015-12-12
Lost connection to MySQL server at ''reading authorization p
這篇文章主要介紹了Lost connection to MySQL server at 'reading authorization packet', system error: 0錯(cuò)誤解決方法,需要的朋友可以參考下2014-08-08

