Mega Code Archive

 
Categories / MySQL Tutorial / Data Types
 

TIMESTAMP NULL DEFAULT 0000-00-00 00

mysql> mysql> CREATE TABLE t2 (ts TIMESTAMP NULL DEFAULT '0000-00-00 00:00:00'); Query OK, 0 rows affected (0.03 sec) mysql> INSERT INTO t2 VALUES (NOW()); Query OK, 1 row affected (0.00 sec) mysql> INSERT INTO t2 VALUES (CURRENT_TIMESTAMP); Query OK, 1 row affected (0.00 sec) mysql> mysql> select * from t2; mysql> mysql> drop table t2; Query OK, 0 rows affected (0.00 sec) mysql>