mysql删除索引

表的结构如下:
| act | CREATE TABLE act (
id bigint(20) NOT NULL AUTO_INCREMENT,
mac varchar(12) NOT NULL,
time datetime DEFAULT NULL,
pid varchar(100) NOT NULL,
buffertime varchar(100) NOT NULL,
PRIMARY KEY (id),
KEY mac_index (mac),
KEY time_index (time),
KEY pid_index (pid),
KEY buffertime_index (buffertime)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 |

删除表的索引,出现了如下问题

MariaDB [TecentAct]> drop index index_pid on act;
ERROR 1091 (42000): Can't DROP 'index_pid'; check that column/key exists
是sql语句的问题么?

阅读 4.6k
1 个回答

你是不是在pid上做了外键索引?

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题