mysql创建索引
来源:互联网 发布:企业qq群发软件 编辑:程序博客网 时间:2024/06/14 02:42
索引的创建
1创建表的时候创建
Create table example(
Id int,
Gread float,
[unique|fulltext|spatial] index|key
[别名] (属性名1[(长度)] [asc |desc])
);
结构:[unique|fulltext|spatial] index|key
[别名] (属性名1[(长度)] [asc |desc])
具体讲解:
Unique:唯一索引
Fulltext:全文索引
Spatial:空间索引
index|key二选一,作用相同
[别名]:可选参数,用来给索引起名字
[(长度)]:可选参数,指定索引长度,只有字符串类型可以使用
[asc |desc]:可选参数asc表示升序排列,desc表示降序排列
2已存在的表创建索引
Create [unique|fulltext|spatial] Index索引名 on 表名(属性名1[(长度)] [asc |desc]);
3删除索引
Drop index 索引名 on 表名;
阅读全文
0 0
- MySQL 创建索引
- MySql 创建索引
- mysql创建索引
- mysql创建唯一索引
- 如何创建MySQL索引
- MySQL创建索引
- MySQL创建索引
- MySQl索引创建
- 如何创建MySQL索引
- 创建mysql索引
- mysql创建索引技巧
- mysql创建index索引
- MYSQL创建唯一索引
- mysql创建索引
- MySQL创建全文索引
- mysql创建索引
- 创建MySQL索引
- mysql创建索引大全
- Redis 在windows中启动
- Android6.0权限申请
- 疑惑建议总结
- leetcode 222. Count Complete Tree Nodes
- Android中的缓存策略--DiskLruCache
- mysql创建索引
- 最小二乘问题与线性回归中的最大似然估计等价
- JQuery移除指定元素
- golang基础-beego读取配置_输出log日志、tailf组件读取log、配置zookeeper_kafka、发送log至kafka
- 二叉树的建立与遍历
- TensorFlow入门(八)tensorboard 的一个简单示例
- vue的父子构造器
- 将HTML页面部分内容导出为PDF
- UE4蓝图节点翻译---Get Components by Class