mysql - 为什么主键图标不亮?

标签 mysql sql database phpmyadmin

刚开始学习数据库,在下面的截图中,为什么CustomerID列的主键没有亮起?根据索引和 SQL 查询,它是主键。我无法单击该图标,也找不到其他任何地方可以将其设为主键。 enter image description here enter image description here

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/

相关文章:

c# - OracleParameter 和 DBNull.Value

database - SPARQL 查询仅获取最近日期的结果

mysql - 关于多表数据库设计问题的评论

尝试从经度和纬度获取距离时出现Mysql错误

给定多条记录根据不同的最大值取最大值的SQL查询

mysql - 如何在 PHPMyAdmin 中选择个人访问者的数量?

mysql - 什么是 MySQL 中状态的最佳列类型

mysql - 我无法在 SQL 上连接多个表

MySQL 创建表/ View

c# - 从数据表中的给定列中获取最大值