Last active
June 30, 2020 06:36
-
-
Save codcodog/fa2cc31bce83902f2650ce6760237277 to your computer and use it in GitHub Desktop.
Mysql created_at updated_at 字段定义
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE demo ( | |
created_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', | |
updated_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment