Created
June 21, 2017 07:13
-
-
Save d3ep4k/e8a0542192167507a71e7250a5a8d021 to your computer and use it in GitHub Desktop.
Create Table with update and create timestamp
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 `msgs` ( | |
`id` INT PRIMARY KEY AUTO_INCREMENT, | |
`msg` VARCHAR(256), | |
`ts_create` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, | |
`ts_update` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment