how to put is null in where in clause 1

how to put is null in where in clause

SELECT *
FROM tbl_name
WHERE 
(id_field IN ('value1', 'value2', 'value3') OR id_field IS NULL)

Here is what the above code is Doing:
1. The first part of the query is the SELECT statement.
2. The second part of the query is the FROM statement.
3. The third part of the query is the WHERE statement.
4. The fourth part of the query is the IN statement.
5. The fifth part of the query is the OR statement.
6. The sixth part of the query is the IS NULL statement.

Similar Posts