Home  >  Article  >  Backend Development  >  请问新建表时,这个 KEY 表示什么?

请问新建表时,这个 KEY 表示什么?

WBOY
WBOYOriginal
2016-06-23 13:53:44925browse

CREATE TABLE `users` (  `id` int(11) NOT NULL auto_increment,  `yhm` varchar(20) NOT NULL,  `mm` varchar(50) default NULL,  `wt` varchar(20) NOT NULL,  PRIMARY KEY  (`id`),  KEY `yhm` (`yhm`)) ENGINE=MyISAM

KEY `yhm` (`yhm`) ------ 请问这一句是做什么用的?


回复讨论(解决方案)

KEY `yhm` (`yhm`) 是索引

index 索引。
PRIMARY KEY  (`id`), 主?
KEY `yhm` (`yhm`) 普通索引

Statement:
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
Previous article:jpgraph 绘图问题Next article:php全等()