sql >> データベース >  >> RDS >> PostgreSQL

NOTINステートメントでPostgresqlANY演算子を使用するにはどうすればよいですか

    あなたがするとき

    select 2 != any(array[2,3,4]);
     ?column? 
    ----------
     t
    

    2 すべての配列アイテムと比較され、2が存在する場合は 等しくない場合、trueと評価されます 。

    not id = any(array[2,3,4])を使用します

    select not 1 = any(array[2,3,4]);
     ?column? 
    ----------
     t
    
    select not 2 = any(array[2,3,4]);
     ?column? 
    ----------
     f
    

    または!= all

    select 1 != all(array[2,3,4]);
     ?column? 
    ----------
     t
    
    select 2 != all(array[2,3,4]);
     ?column? 
    ----------
     f
    


    1. MySQL:別のサーバーからのSELECT

    2. Spring Boot:Jdbc javax.net.ssl.SSLException:ピアのclose_notifyを受信する前にインバウンドを閉じます

    3. SQLException:プロトコル違反。 OracleJDBCDriverの問題

    4. magentoは複数のMySQLスレーブを使用できますか?