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

WBOY
Release: 2016-06-13 12:02:32
Original
1092 people have browsed it

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

CREATE TABLE `users` (<br />  `id` int(11) NOT NULL auto_increment,<br />  `yhm` varchar(20) NOT NULL,<br />  `mm` varchar(50) default NULL,<br />  `wt` varchar(20) NOT NULL,<br />  PRIMARY KEY  (`id`),<br />  KEY `yhm` (`yhm`)<br />) 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