Postgresql select命令中的isNullOrEmpty等效于什么?

Postgresql select命令中的isNullOrEmpty等效于什么?,postgresql,Postgresql,它不起作用 在complaintprocess表endtime中,数据类型为timestamp,不带时区。 在这里,我想获得投诉流程中的一列,其中结束时间为空。您无法将'存储为时间戳。我猜想blank是指NULL值 select complaintno from complaintprocess where endtime=''; 要过滤它们,您可以使用: SELECT CAST('' AS timestamp); -- ERROR: invalid input syntax for typ

它不起作用

complaintprocess
endtime
中,数据类型为
timestamp
,不带时区。 在这里,我想获得
投诉流程中的一列,其中
结束时间
为空。

您无法将
'
存储为时间戳。我猜想
blank
是指
NULL

select complaintno from complaintprocess  where endtime='';
要过滤它们,您可以使用:

SELECT CAST('' AS timestamp);
-- ERROR: invalid input syntax for type timestamp: ""
是字符串文字。将字符串与时间戳进行比较没有意义。使用endtime为null的
检查是否缺少值
SELECT complaintno 
FROM complaintprocess  
WHERE endtime IS NULL;