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;