Home > Database > Mysql Tutorial > mysql-Mysql中index与key的区别

mysql-Mysql中index与key的区别

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-06 09:44:17
Original
1284 people have browsed it

mysqlindexkey

-------------------------+
| user | CREATE TABLE user (
id int(11) NOT NULL,
name varchar(50) default NULL,
companyId int(11) default NULL,
PRIMARY KEY (id),
KEY company_user_id (companyId)
) ENGINE=InnoDB DEFAULT CHARSET=gbk |

上面的建表语句中,KEY company_user_id (companyId),这句话起什么作用?
和 index company_user_id (companyId)有什么区别?

Related labels:
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