DROPindexid_fname_lnameonemployee;QueryOK,0rowsaffected(0.30sec)Records:0Duplicates:0Warnings:0 It can be observed from the result set of the following query Deletion of UNIQUE index-mysql>showindexfromemployee;Emptyset(0"> How do we drop a multi-column UNIQUE index?-Mysql Tutorial-php.cn

How do we drop a multi-column UNIQUE index?

王林
Release: 2023-09-05 14:25:02
forward
1232 people have browsed it

How do we drop a multi-column UNIQUE index?

Multi-column UNIQUE indexes can also be dropped just like we drop UNIQUE constraints from the table.

Example

In this example, we have deleted a multi-column UNIQUE index on the table "employee" using the following query -

mysql> DROP index id_fname_lname on employee; Query OK, 0 rows affected (0.30 sec) Records: 0 Duplicates: 0 Warnings: 0
Copy after login

It can be observed from the result set of the following query Deletion of UNIQUE index-

mysql> show index from employee; Empty set (0.00 sec) mysql> describe employee; +------------+-------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +------------+-------------+------+-----+---------+-------+ | empid | int(11) | YES | | NULL | | | first_name | varchar(20) | YES | | NULL | | | last_name | varchar(20) | YES | | NULL | | +------------+-------------+------+-----+---------+-------+ 3 rows in set (0.08 sec)
Copy after login

The above is the detailed content of How do we drop a multi-column UNIQUE index?. For more information, please follow other related articles on the PHP Chinese website!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!