Home > Database > Mysql Tutorial > MySQL数据库添加一个字段_MySQL

MySQL数据库添加一个字段_MySQL

WBOY
Release: 2016-06-01 13:17:59
Original
1194 people have browsed it

bitsCN.com

MySQL数据库添加一个字段

1、添加一个字段

alter table tableName add 列名  数据类型;

2、添加一个字段设置默认值

alter table tableName add 列名  数据类型 default 0;

(注:设置默认值为0)

 

参考:http://hi.baidu.com/pianxicun/item/bf6785097ba43d304bc4a36d

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