UNIX_TIMESTAMPの挿入
mysql> INSERT INTO abc (id, timestamp) VALUES ('', UNIX_TIMESTAMP());
MySQLでタイムスタンプ確認方法
mysql> SELECT NOW() AS DATETIME;
+---------------------+
| DATETIME |
+---------------------+
| 2014-01-20 17:25:27 |
+---------------------+
1 row in set (0.00 sec)
mysql> SELECT UNIX_TIMESTAMP() AS TIMESTAMP;
+------------+
| TIMESTAMP |
+------------+
| 1390206355 |
+------------+
1 row in set (0.00 sec)
mysql> SELECT UNIX_TIMESTAMP('2013-06-15 19:37:33') AS TIMESTAMP;
+------------+
| TIMESTAMP |
+------------+
| 1371292653 |
+------------+
1 row in set (0.00 sec)
mysql> SELECT FROM_UNIXTIME(1371292653) AS DATETIME;
+---------------------+
| DATETIME |
+---------------------+
| 2013-06-15 19:37:33 |
+---------------------+
1 row in set (0.00 sec)