当前位置:网站首页>Three ways of creating indexes in MySQL
Three ways of creating indexes in MySQL
2022-07-29 01:27:00 【m0_ sixty-seven million three hundred and ninety-three thousand】
1、 Use CREATE INDEX establish , The grammar is as follows :
CREATEINDEXindexNameONtableName(columnName(length));
2、 Use ALTER Sentence creation , The grammar is as follows :
ALTERTABLEtableNameADDINDEXindexName(columnName);
ALTER Statement to create an index , The following provides an example of setting the index length :
ALTERTABLEt_user_action_logADDINDEXip_address_idx(ip_address(16));
SHOWINDEXFROMt_user_action_log;
3、 Create an index when creating a table
CREATETABLEtableName(
idINTNOTNULL,
columnNamecolumnType,
INDEX[indexName](columnName(length))
);
Example :

边栏推荐
- Summary of process and thread knowledge points 2
- Digital twin rail transit: "intelligent" monitoring to clear the pain points of urban operation
- 正则表达式
- vm options、program arguments、environment property
- js判断 数组/对象数组 1 是否包含数组/对象数组 2
- Synchronized关键字详解
- Google Play APK 上传其他国际应用商店
- 量化交易之数字货币篇 - 生成foot print因子数据
- 测试/开发程序员靠技术渡过中年危机?提升自己本身的价值......
- SDRAM Controller Design (two design methods of digital controller)
猜你喜欢
随机推荐
教你一文解决 js 数字精度丢失问题
[MySQL] historical cumulative de duplication of multiple indicators
Canal real-time parsing MySQL binlog data practice
How to carry out engineering implementation of DDD Domain Driven Design
Flink Postgres CDC
Univariate function integration 1__ Indefinite integral
APP接入Kakaotalk三方登录
IT硬件故障的主要原因和预防的最佳实践
Docker-compose安装mysql
18 diagrams, intuitive understanding of neural networks, manifolds and topologies
Bracket matching test
Regular checksum time formatting
【ManageEngine】助力哈尔滨工程大学实现网络流量一体化监控管理
[Jenkins' notes] introduction, free space; Continuous integration of enterprise wechat; Allure reports, continuous integration of email notifications; Build scheduled tasks
Transfer: cognitive subculture
Intel introduces you to visual recognition -- openvino
拼多多众多 API 接口皆可使用
File “manage.py“, line 14 ) from exc
嵌入式分享合集23
Self-attention neural architecture search for semantic image segmentation









