Mysql alter常見使用語句

2021-09-06 12:31:12 字數 1079 閱讀 2022

//新增主鍵

alter table tabelname add new_field_id int(5) unsigned default 0 not null auto_increment ,add primary key (new_field_id);

//增加乙個新列

alter table rpt_fmp_eleven_auction_info_d_01 add iuv bigint(20) default null comment 'iuv';

//刪除列

alter table t2 drop column c;

//重新命名列

alter table t1 change a b integer;

//改變列的型別

alter table rpt_fmp_eleven_auction_sku_d_00 change sku_outer_id sku_outer_id varchar(256) default null comment '注釋';

//重新命名表

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);

加主關鍵字的索引

mysql> alter table tablename add primary key(id);

加唯一限制條件的索引

mysql> alter table tablename add unique emp_name2(cardnumber);

刪除某個索引

mysql>alter table tablename drop index emp_name;

刪除字段:

mysql> alter table table_name drop field_name;

mysql ALTER 語句的使用

基本語法 alter online offline ignore tabletbl name alter specification alter specification partition options alter specification table options add column ...

效能測試常見用語

常見術語 併發使用者數量 請求響應時間 事務響應時間 吞吐率 點選率 資源利用率 講解 請求響應時間 從client端發出請求到得到響應的整個時間 一般包括網路響應時間 server的響應時間 吞吐率 單位時間在網路上傳輸的資料量 是從server端返回client端的數量量 這是衡量網路效能的主要...

CSDN markdown 使用語法

建立乙個自定義列表 如何建立乙個註腳 注釋也是必不可少的 katex數學公式 新的甘特圖功能,豐富你的文章 uml 圖表 flowchart流程圖 匯出與匯入 你好!這是你第一次使用markdown編輯器所展示的歡迎頁。如果你想學習如何使用markdown編輯器,可以仔細閱讀這篇文章,了解一下mar...