Home > Database > Mysql Tutorial > MySQL里Create Index 能否创建主键 Primary Key

MySQL里Create Index 能否创建主键 Primary Key

WBOY
Release: 2016-06-07 18:01:19
Original
1145 people have browsed it

MySQL里Create Index 能否创建主键 Primary Key

MySQL里Create Index 能否创建主键 Primary Key?
答案:

不能,必须用 Alter table 创建。

MySQL一个索引列最大允许的有效长度,不是列的所有数据都被索引的

MyISAM 是 1000字节
InnoDB 是 767 字节

注意这里是字节。
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template