Home  >  Article  >  Database  >  mysql字段默认值的修改_MySQL

mysql字段默认值的修改_MySQL

WBOY
WBOYOriginal
2016-06-01 13:39:25991browse

bitsCN.com
mysql字段默认值的修改 有时无法直接修改默认值,则:  1.先把此列删掉,然后再增加,增加的时候直接把默认值附上。  alter table tablename drop column cloumnname;    alter table tablename add column columnname timestamp default value;  2.删掉表,重新建表。在建表时设置默认值。
  bitsCN.com

Statement:
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