Home > Database > Mysql Tutorial > mysql 给字段增添default

mysql 给字段增添default

WBOY
Release: 2016-06-07 16:15:49
Original
1447 people have browsed it

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;
Copy after login

?

注意:修改字段用关键字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

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