我有以下表結構:MySQL的DATE返回NULL
uid | ... | created | ...
int(10) | ... | int(10) | ...
created
字段填充有時間戳;這裏有查詢SELECT created FROM mytable WHERE 1 LIMIT 5
的結果:
created
----------
1308122243
1308122243
1308552690
1309247417
1309254571
但是,當我執行SELECT DATE(created) FROM mytable WHERE 1 LIMIT 5
,我得到了奇怪的NULL的:
DATE(created)
-------------
2013-08-12
2013-08-12
NULL
NULL
NULL
爲什麼出現這種情況?
查詢的結果集「SELECT created from mytable WHERE 1 LIMIT 5」有點令人困惑,PLZ粘貼確切結果集 –