phpMyAdmin 删除索引
我的一个表中有一个列已分配有索引。它阻止我拥有两个相同的 ID 号码。
我假设它不允许我有两个相同 ID 的条目的原因是因为它已被设置为唯一。
我想知道如何删除此规则,以便我可以多次插入相同的 ID 号。
干杯
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
我的一个表中有一个列已分配有索引。它阻止我拥有两个相同的 ID 号码。
我假设它不允许我有两个相同 ID 的条目的原因是因为它已被设置为唯一。
我想知道如何删除此规则,以便我可以多次插入相同的 ID 号。
干杯
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(4)
在表结构中的“列”列表下方,有一个名为“索引”的小表。每一行都是一个索引。在那里找到您的唯一索引并使用“删除”符号(红色 X)删除它。如果您将其放在多个列上,则将其删除并重新创建,但不包含您不希望唯一的列
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
请按照以下步骤操作:-
Follow this steps:-
在表下方的选项卡结构中列出了索引。在某些版本的 PHPMyAdmin 中,仅当您单击“+索引”时才会列出索引,这很容易被忽视。
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.
ALTER TABLE
dbName
.table
DROP INDEXindexName
ALTER TABLE
dbName
.table
DROP INDEXindexName