Postgres NOT IN (null) gives no result

后端 未结 6 1324
长发绾君心
长发绾君心 2021-02-07 05:03

I\'m using Postgres with this query

select 
*
from Entity this_ 
where 
(this_.ID not in (null))

Why does this give me no results? I would expe

6条回答
  •  隐瞒了意图╮
    2021-02-07 05:34

    You can use <> ANY operator. Example on your code:

    select 
      * 
    from Entity this_ 
    where 
       (this_.ID <> ANY (null))
    

提交回复
热议问题