In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "what are the sql statements to create an index?" the content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "what are the sql statements to create an index"?
The sql statement to create the index is [CREATE INDEX indexName ON table_name (column_name)], which is the most basic index without any restrictions.
The operating environment of this paper: windows10 system, mysql 5.7, thinkpad T480 computer.
The sql statement to create the index is as follows:
Here is the most basic syntax for creating an index, which has no restrictions.
CREATE INDEX indexName ON table_name (column_name)
If it is of type CHAR,VARCHAR, the length can be less than the actual length of the field; for types of BLOB and TEXT, length must be specified.
Modify table structure (add index)
ALTER table tableName ADD INDEX indexName (columnName)
Specify directly when you create a table
CREATE TABLE mytable (ID INT NOT NULL, username VARCHAR (16) NOT NULL, INDEX [indexName] (username (length); thank you for reading, the above is the content of "what is the sql statement to create the index?" after the study of this article, I believe you have a deeper understanding of what the sql statement to create the index has, and the specific use still needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.