TIMESTAMP NULL DEFAULT NULL : Timestamp : Data Types MySQL TUTORIALS


MySQL TUTORIALS » Data Types » Timestamp »

 

TIMESTAMP NULL DEFAULT NULL


mysql>
mysql> CREATE TABLE t1 (ts TIMESTAMP NULL DEFAULT NULL);
Query OK, rows affected (0.03 sec)

mysql>
mysql> INSERT INTO t1 VALUES (NOW());
Query OK, row affected (0.00 sec)

mysql> INSERT INTO t1 VALUES (CURRENT_TIMESTAMP);
Query OK, row affected (0.00 sec)

mysql>
mysql> select from t1;
+---------------------+
| ts                  |
+---------------------+
2007-07-23 19:09:19 |
2007-07-23 19:09:19 |
+---------------------+
rows in set (0.00 sec)

mysql>
mysql> drop table t1;
Query OK, rows affected (0.00 sec)



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

MySQL TUTORIALS

 Navioo Data Types
» Timestamp