Get the App
SLTechnology News&Howtos  ›  Database  › 

Mysql table-in-table field index establishment process

Shulou Source: shulou.com Published: 2022-06-01 20:43:31 11月13日 Update

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.

Tags: Index writing field specialty knowledge process table different ordinary below books people value full text content available in technology more query tables users Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS Xiaomi Shulou Technology vpn Docker