database phpMyAdmin 删除索引

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/4320005/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-08 07:56:28  来源:igfitidea点击:

phpMyAdmin Removing an index

databaseindexingphpmyadminunique

提问by Samuel Meddows

I have a column in one of my tables which has been assigned an index. It is preventing me from having two of the same ID number.

我的其中一个表中有一个已分配索引的列。它阻止我拥有两个相同的 ID 号。

I am assuming the reason it is not letting me have two entries of the same ID is because it has been set to be Unique.

我假设它不允许我有两个相同 ID 的条目的原因是因为它已设置为唯一。

I am wondering how do I remove this rule so that I can insert the same ID number several times.

我想知道如何删除此规则,以便多次插入相同的 ID 号。

Cheers

干杯

回答by Michael Tabolsky

below the list of your "columns" in the table structure you have a small table called "Indexes". Every row is an index. Find there your unique index and drop it using "drop" symbol (red X). If you have it on more than one column then drop it and recreate without the column you don't want unique

在表结构中的“列”列表下方,您有一个名为“索引”的小表。每一行都是一个索引。在那里找到您的唯一索引并使用“drop”符号(红色 X)将其删除。如果您将它放在多个列上,则将其删除并在没有您不希望唯一的列的情况下重新创建

回答by vineet

Follow this steps:-

请按照以下步骤操作:-

  1. Click Structuretab of table.
  2. Click Index(below the table).
  3. Click Dropfor remove index(s).
  1. 单击表的结构选项卡。
  2. 单击索引(表格下方)。
  3. 单击删除以删除索引。

enter image description here

在此处输入图片说明

回答by Gunnar Bernstein

In the tab structure below the table the indexes are listed. In some versions of PHPMyAdmin the index are listed only if you click on "+Indexes" which is easy to overlook.

在表格下方的选项卡结构中,列出了索引。在某些版本的 PHPMyAdmin 中,仅当您单击“+Indexes”时才会列出索引,这很容易被忽略。

回答by saeid sayadi

ALTER TABLE dbName.tableDROP INDEX indexName

更改表dbNametable下降指数indexName