Overview An index is a table of correspondence between column values and record rows created by the DBMS based on one or more columns in a table in a certain order, which facilitates DBA management.
According to their usage, indexes are logically divided into three categories
Create Index There are three ways to create indexes: CREATE INDEX CREATE [UNIQUE] INDEX index_name NO tbl_name(index_col_name,...)
The three grammatical elements of the index description
mysql>CREATE INDEX index_customers -> NO mysql_test.customers (cust_name(3)ASC) Query OK, 0 rows affected (0.20 sec) Records:0 Duplicates:0 Warning:0 CREATE TABLE
mysql> USE mysql_test Database changed mysql> CREATE TABLE seller ->( -> seller_id int NOT NULL AUTO_INCREMENT -> seller_name char(50) NOT NLULL, -> seller_address char(50) null, -> product_type int(5) NULL -> sales int NULL -> PRIMARY KEY (seller_id,product_type) -> INDEX index_seller(salse) ->) Query OK, 0 rows affected (0.20 sec) ALTER TABLE Summarize The above is the full content of this article. I hope that the content of this article will have certain reference learning value for your study or work. Thank you for your support of 123WORDPRESS.COM. You may also be interested in:
|
<<: Simple implementation of mini-vue rendering
>>: Build a WebRTC video chat in 5 minutes
By default, processes in the container run with r...
This article shares the specific code of the WeCh...
Demand background A statistical interface, the fr...
The implementation of custom carousel chart using...
This article records the detailed installation pr...
Table of contents MySQL result sorting - Aggregat...
Syntax format: row_number() over(partition by gro...
Time always passes surprisingly fast without us n...
Preface What is a slow query and how to optimize ...
When encapsulating the date picker, you need to d...
There are many Hadoop installation tutorials on L...
Table of contents introduction 1. Code to start t...
The description of echo in the Linux help documen...
Table of contents Initialize MySQL Install MySQL ...
Table of contents design Component Communication ...