当前位置:网站首页>MySQL索引
MySQL索引
2022-07-26 22:45:00 【掌九】
表结构如下:
writers表结构
字段名 数据类型 主键 外键 非空 唯一 自增
w_id SMALLINT(11) 是 否 是 是 是
w_name VARCHAR(255) 否 否 是 否 否
w_address VARCHAR(255) 否 否 否 否 否
w_age CHAR(2) 否 否 是 否 否
w_note VARCHAR(255) 否 否 否 否 否
(1)在数据库里创建表writers,存储引擎为MyISAM,创建表的同时在w_id字段上添加名称为UniqIdx的唯一索引
(2)使用alter table语句在w_name字段上建立nameIdx的普通索引
(3)使用CREATE INDEX 语句在w_address和w_age字段上面建立名称为MultiIdx的组合索引
(4)使用create index语句在w_note字段上建立名称为FTIdex的全文索引
(5)删除名为FTIdx的全文索引

边栏推荐
猜你喜欢
随机推荐
39 installing LNMP
29shell function
Shell (9) function
Understanding and learning of internal classes
1100: finding the number of combinations (function topic)
C language problem solving -- let the balloon rise
无线传感器网络(双语)复习
Identify artifact MX yolov3
Web server (01) -- Introduction to web server
FaceNet
[by pass] bypass method of WAF
VirtualBox VMS extended disk space
ONEFLOW source code list: GDB compilation and debugging
域名分析和DNS的配置安装
Docter的安装和基础操作
32三剑客sed
Paddleocr usage example
LAMP.
Ubuntu12.10安装Mysql5.5(三)
21DNS域名解析









