我有一个如下所示的查询:
SELECT * FROM table WHERE timestamp = NULL;
timestamp列是具有时区数据类型的时间戳(this表中的第二个类型) . 这是在PostgreSQL 8.4中 .
我在'm trying to accomplish is to only select rows that have not had a timestamp inserted. When I look at the data in pgAdmin the field is empty and shows no value. I'尝试过哪里时间戳= NULL
, 'EPOCH'
(您认为这是默认值),零的有效时间戳( 0000-00-00 00:00:00-00
,导致超出范围错误),根据文档可能的最低日期( January 1, 4713 BC
)和一个空白字符串( ''
,只是获取数据类型不匹配错误) . 似乎没有 is_timestamp()
函数可用于检查结果是否不是有效的时间戳 .
所以,问题是,我可以检查的空场中有什么 Value ?
谢谢 .
编辑:该字段没有默认值 .
1 回答
尝试
timestamp is null
,因为我在MySQL中使用此语法