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
Table of contents Methods of String Object Method...
This article uses examples to describe the creati...
Table of contents Preface Implementation ideas Im...
This article installs Google Input Method. In fac...
Vertical Split Vertical splitting refers to the s...
After installing Docker, I encountered the x509 p...
Only show the top border <table frame=above>...
Table of contents Preface Why do we need to encap...
Problem: The partition where MySQL stores data fi...
When using MySQL, we often sort and query a field...
Table of contents 1. Create a socket 2. Bind sock...
Beginners can learn HTML by understanding some HT...
Over a period of time, I found that many people d...
Table of contents 1. parse 1.1 Rules for intercep...
count(*) accomplish 1. MyISAM: Stores the total n...