刚开始学习数据库,在下面的截图中,为什么CustomerID列的主键没有亮起?根据索引和 SQL 查询,它是主键。我无法单击该图标,也找不到其他任何地方可以将其设为主键。
SQL result<p></p>
<p>Host: 127.0.0.1
Database: WMCRM
Generation Time: Nov 29, 2013 at 08:27 PM
Generated by: phpMyAdmin 4.0.4.1 / MySQL 5.5.32
SQL query: show create table CUSTOMER;
Rows: 1</p>
<p>This table does not contain a unique column. Grid edit, checkbox, Edit, Copy and Delete features are not available.
Table Create Table<br/>
CUSTOMER CREATE TABLE <code>customer</code> (
<code>CustomerID</code> int(11) NOT NULL AUTO_INCREMENT,
<code>LastName</code> text NOT NULL,
<code>FirstName</code> text NOT NULL,
<code>Address</code> text NOT NULL,
<code>City</code> text NOT NULL,
<code>State</code> text NOT NULL,
<code>ZIP</code> text NOT NULL,
<code>Phone</code> text NOT NULL,
<code>Fax</code> text NOT NULL,
<code>Email</code> text NOT NULL,
PRIMARY KEY (<code>CustomerID</code>)
) ENGINE=InnoDB DEFAULT CHARSET=utf8</p>
<p></p>
最佳答案
主键图标或链接仅在可以完成操作时才可用。是这种情况吗,因为该列已经是主键,所以无法进行使其成为主键的操作。
关于mysql - 为什么主键图标不亮?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20292233/