Postgres NOT in array

Postgres NOT in array

Asked on January 10, 2019 in PostgreSQL.
Add Comment


  • 3 Answer(s)

    Below solution for the Postgres NOT in array

    SELECT COUNT(*) FROM "messages" WHERE NOT (3 = ANY (recipient_ids))
    
    

    always annihilate WHERE (condition) with WHERE NOT (condition)

     

    Answered on January 10, 2019.
    Add Comment

    User can could turn it around a bit and say “3 is not equal to all the IDs”:

    where 3 != all (recipient_ids)
    
    

    Refer this page  fine manual:

    Answered on January 10, 2019.
    Add Comment

    Use this command

    not (3 = any(recipient_ids))?
    
    
    Answered on January 10, 2019.
    Add Comment


  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.