Home > Database > Mysql Tutorial > mysql给表添加字段的命令_MySQL

mysql给表添加字段的命令_MySQL

WBOY
Release: 2016-06-01 13:17:55
Original
830 people have browsed it

bitsCN.com

给表添加字段的命令:

alter table tableName add newColumn varchar(8) comment '新添加的字段'
Copy after login

在这句语句中需要注意的是,comment为注释,就像在java中//作用是一样的。

comment后需要加单引号将注释引起来。

bitsCN.com
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