国产一级a片免费看高清,亚洲熟女中文字幕在线视频,黄三级高清在线播放,免费黄色视频在线看

打開(kāi)APP
userphoto
未登錄

開(kāi)通VIP,暢享免費(fèi)電子書(shū)等14項(xiàng)超值服

開(kāi)通VIP
mysql 添加字段、刪除字段、調(diào)整字段順序 | mysql添加字段

添加字段:

alter table `user_movement_log`
Add column GatewayId int  not null default 0 AFTER `Regionid` (在哪個(gè)字段后面添加)

 刪除字段:

alter table `user_movement_log` drop column Gatewayid

調(diào)整字段順序:

ALTER TABLE `user_movement_log`  CHANGE `GatewayId` `GatewayId` int not null default 0  AFTER RegionID

//主鍵

   alter table tabelname add new_field_id int(5) unsigned default 0 not null auto_increment ,add primary key (new_field_id);//增加一個(gè)新列

   alter table t2 add d timestamp;
alter table infos add ex tinyint not null default ‘0′;//刪除列

   alter table t2 drop column c;//重命名列

   alter table t1 change a b integer;
//改變列的類型

   alter table t1 change b b bigint not null;
alter table infos change list list tinyint not null default ‘0′;
//重命名表

   alter table t1 rename t2;加索引

   mysql> alter table tablename change depno depno int(5) not null;
mysql> alter table tablename add index 索引名 (字段名1[,字段名2 …]);
mysql> alter table tablename add index emp_name (name);加主關(guān)鍵字的索引

mysql> alter table tablename add primary key(id);加唯一限制條件的索引

  mysql> alter table tablename add unique emp_name2(cardnumber);刪除某個(gè)索引

   mysql>alter table tablename drop index emp_name;修改表:

增加字段:

   mysql> ALTER TABLE table_name ADD field_name field_type;修改原字段名稱及類型:

   mysql> ALTER TABLE table_name CHANGE old_field_name new_field_name field_type;刪除字段:

   mysql> ALTER TABLE table_name DROP field_name;

本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊舉報(bào)。
打開(kāi)APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
mysql常用操作指令——ALTER語(yǔ)句用法
MySql增加字段、刪除字段、修改字段名稱、修改字段類型
mysql中SQL語(yǔ)句修改2
mysql 增加字段 修改字段 刪除表字段
數(shù)據(jù)庫(kù)
你需要的 MySQL 基礎(chǔ)內(nèi)容,全在這里了!
更多類似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長(zhǎng)圖 關(guān)注 下載文章
綁定賬號(hào)成功
后續(xù)可登錄賬號(hào)暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服