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

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

WBOY
Release: 2016-06-23 13:53:44
Original
970 people have browsed it

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
Copy after login

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


回复讨论(解决方案)

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

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

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