I have a database with 3 columns:
id, name, somethingelse
This table has no index set and i am getting "No index defined!" in phpmyadmin
id is a 7digit alphanumeric value, unique to each row.
I want to set Drugid to be the primarykey/index (i dont know the difference if there is one)
Please explain in detail as i am new to this.
Thank you.
解决方案
Either run in SQL:
ALTER TABLE tableName
ADD PRIMARY KEY (id) ---or Drugid, whichever you want it to be PK
or use the PHPMyAdmin interface (Table Structure)
本文介绍如何在没有定义索引的情况下,通过SQL命令或PHPMyAdmin界面为数据库表的特定列设置主键。以id或Drugid为例,演示了两种设置方法。
6万+

被折叠的 条评论
为什么被折叠?



