Created
July 30, 2014 19:58
-
-
Save jamesonjlee/0072a9068d820035bf81 to your computer and use it in GitHub Desktop.
timestamp can both be null and have a default
This file contains 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
mysql> create table temp3 ( id int, bleh int default null default 1, tstamp timestamp null default CURRENT_TIMESTAMP ); | |
Query OK, 0 rows affected (0.01 sec) | |
mysql> show create table temp3; | |
+-------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |
| Table | Create Table | | |
+-------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |
| temp3 | CREATE TABLE `temp3` ( | |
`id` int(11) DEFAULT NULL, | |
`bleh` int(11) DEFAULT '1', | |
`tstamp` timestamp NULL DEFAULT CURRENT_TIMESTAMP | |
) ENGINE=InnoDB DEFAULT CHARSET=latin1 | | |
+-------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |
1 row in set (0.00 sec) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment