欧美一区二区三区老妇人-欧美做爰猛烈大尺度电-99久久夜色精品国产亚洲a-亚洲福利视频一区二区

mysql數(shù)據(jù)庫的索引類型-創(chuàng)新互聯(lián)

索引類型介紹:

為順德等地區(qū)用戶提供了全套網(wǎng)頁設(shè)計制作服務(wù),及順德網(wǎng)站建設(shè)行業(yè)解決方案。主營業(yè)務(wù)為做網(wǎng)站、成都網(wǎng)站設(shè)計、順德網(wǎng)站設(shè)計,以傳統(tǒng)方式定制建設(shè)網(wǎng)站,并提供域名空間備案等一條龍服務(wù),秉承以專業(yè)、用心的態(tài)度為用戶提供真誠的服務(wù)。我們深信只要達(dá)到每一位用戶的要求,就會得到認(rèn)可,從而選擇與我們長期合作。這樣,我們也可以走得更遠(yuǎn)!

主鍵索引

primary key() 要求關(guān)鍵字不能重復(fù),也不能為null,同時增加主鍵約束 主鍵索引定義時,不能命名

唯一索引

unique index() 要求關(guān)鍵字不能重復(fù),同時增加唯一約束

普通索引

index() 對關(guān)鍵字沒有要求

全文索引

fulltext key() 關(guān)鍵字的來源不是所有字段的數(shù)據(jù),而是字段中提取的特別關(guān)鍵字

關(guān)鍵字:可以是某個字段或多個字段,多個字段稱為復(fù)合索引。

實例:

建表:
creat table student(
    stu_id int unsigned not null auto_increment,
    name varchar(32) not null default '',
    phone char(11) not null default '',
    stu_code varchar(32) not null default '',
    stu_desc text,
    primary key ('stu_id'),     //主鍵索引
    unique index 'stu_code' ('stu_code'), //唯一索引
    index 'name_phone' ('name','phone'),  //普通索引,復(fù)合索引
    fulltext index 'stu_desc' ('stu_desc'), //全文索引) engine=myisam charset=utf8;

更新:
alert table student    add primary key ('stu_id'),     //主鍵索引
    add unique index 'stu_code' ('stu_code'), //唯一索引
    add index 'name_phone' ('name','phone'),  //普通索引,復(fù)合索引
    add fulltext index 'stu_desc' ('stu_desc'); //全文索引刪除:
alert table sutdent
    drop primary key,
    drop index 'stu_code',
    drop index 'name_phone',
    drop index 'stu_desc';

以上就是mysql索引類型介紹的詳細(xì)內(nèi)容,更多請關(guān)注創(chuàng)新互聯(lián)其它相關(guān)文章!

網(wǎng)站題目:mysql數(shù)據(jù)庫的索引類型-創(chuàng)新互聯(lián)
轉(zhuǎn)載源于:http://chinadenli.net/article18/cogsgp.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供響應(yīng)式網(wǎng)站、虛擬主機、網(wǎng)站策劃、面包屑導(dǎo)航、ChatGPT、品牌網(wǎng)站設(shè)計

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

成都app開發(fā)公司