Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
IN() sql ステートメントの反対は何ですか。2、5、および 6 を除くすべてのレコードを取得するには、次のステートメントをどのように構成すればよいでしょうか。INが機能しない直前。
$sql = "SELECT * FROM table WHERE column IN('2','5','6')";
$sql = "SELECT * FROM table WHERE column NOT IN('2','5','6')";
編集 :
コメントの「onedaywhen」と「ypercube」で指摘されているように、
Null Allowed列の場合、追加が必要になる場合があります
OR column IS NOT NULL
また
OR column IS NULL