Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Mysql table-in-table field index establishment process

2025-01-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

The following content mainly brings you the mysql table-in-table field index establishment process, the knowledge here is slightly different from books, are summed up by professional and technical personnel in the process of contact with users, have a certain experience sharing value, hope to bring help to the majority of readers.

1. Add PRIMARY KEY (primary key index): ALTER TABLE `table_ name` ADD PRIMARY KEY (`column`) 'table_name' table name column field sets the column field of the table_name table to primary key 2. Add UNIQUE (unique index):

ALTER TABLE `table_ name` ADD UNIQUE (`column`) 3. Add INDEX (general index): writing method 1: ALTER TABLE `table_ name` ADD INDEX index_name (`column`) writing method 2: CREATE INDEX index_name ON `column1`, `column2`, `column3`) 4. Add FULLTEXT (full-text index): ALTER TABLE `table_ name` ADD FULLTEXT (`column`) 5. Add multi-column index (joint index): write method 1: ALTER TABLE `table_ name` ADD INDEX index_name (`column1`, `column2`, `column3`) second: CREATE INDEX index_name ON `column1` (`column2`, `column3`) 6. Query table index SHOW INDEX FROM `table_ name`; 7. Delete index

DROP INDEX index_name ON `table_ name`

For the above, if you need to know more, you can continue to pay attention to the innovation of our industry, if you need to get professional answers, you can contact the pre-sale and after-sale on the official website. I hope this article can bring you some knowledge updates.

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.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report