In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
The main purpose of this article is to tell you briefly about the steps of creating and deleting indexes in MySQL. You can check the relevant professional terms on the Internet or find some related books to supplement them. We will not dabble here, so let's go straight to the topic. I hope this article on the steps of creating and deleting indexes by MySQL can bring you some practical help.
one。 Add Index
(1) ALTER TABLE statement
1.PRIMARY KEY (primary key index) mysql > ALTER TABLE `table_ name` ADD PRIMARY KEY (`column`) 2.UNIQUE (unique index) mysql > ALTER TABLE `table_ name` ADD UNIQUE (`column`) 3.INDEX (general index) mysql > ALTER TABLE `table_ name` ADD INDEX index_name (`column`) 4.FULLTEXT (full-text index) mysql > ALTER TABLE `table_ name` ADD FULLTEXT (`column`) 5. Multi-column index mysql > ALTER TABLE `table_ name` ADD INDEX index_name (`column1`, `column2`, `column3`)
(2) CREATE INDEX statement
1.UNIQUE (unique index) mysql > CREATE UNIQUE INDEX index_name ON `table_ name` (`column`) 2.INDEX (ordinary index) mysql > CREATE INDEX index_name ON `table_ name` (`column`) 3. Multi-column index mysql > CREATE INDEX index_name ON `columnname` (`column1`, `column2`, `column3`)
two。 Delete index
1.PRIMARY KEY (primary key index) mysql > ALTER TABLE `table_ name` DROP PRIMARY KEY 3.INDEX (normal index) or UNIQUE (unique index) mysql > ALTER TABLE `table_ name` DROP INDEX index_name mysql > DROP INDEX index_name ON `talbe_ name`
MySQL index creation and deletion steps to tell you here, for other related issues you want to know can continue to pay attention to our industry information. Our section will capture some industry news and professional knowledge to share with you every day.
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.