Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在 MySQL 中创建 unix 时间戳?我知道类型设置为INT,值是NULL,但我需要它以如下格式填充当前时间:1343782742
INT
NULL
利用UNIX_TIMESTAMP(date)
UNIX_TIMESTAMP(date)
SELECT UNIX_TIMESTAMP(NOW())
SQLFiddle 演示
UNIX_TIMESTAMP