IN Clause with NULL or IS NULL

后端 未结 7 1577
我在风中等你
我在风中等你 2020-11-30 00:26

Postgres is the database

Can I use a NULL value for a IN clause? example:

SELECT *
FROM tbl_name
WHERE id_field IN (\'value1\', \'value2\', \'value3\         


        
7条回答
  •  执念已碎
    2020-11-30 00:59

    Null refers to an absence of data. Null is formally defined as a value that is unavailable, unassigned, unknown or inapplicable (OCA Oracle Database 12c, SQL Fundamentals I Exam Guide, p87). So, you may not see records with columns containing null values when said columns are restricted using an "in" or "not in" clauses.

提交回复
热议问题