Home  >  Article  >  Database  >  mysql 给字段增添default

mysql 给字段增添default

WBOY
WBOYOriginal
2016-06-07 16:15:491354browse

mysql 给字段添加default ? alter table t_incoming_records modify incomingtime datetime default CURRENT_TIMESTAMP; ? 注意:修改字段用关键字modify. modify后的column可以省略。 ? refurl:http://doc.mysql.cn/mysql5/refman-5.1-zh.html-chapter/sql-s

mysql 给字段添加default

?

alter table  t_incoming_records modify  incomingtime datetime   default C
URRENT_TIMESTAMP;

?

注意:修改字段用关键字modify.

modify后的column可以省略。

?

refurl:http://doc.mysql.cn/mysql5/refman-5.1-zh.html-chapter/sql-syntax.html#alter-table

?

http://wandejun1012.iteye.com/admin/blogs/1813966

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