MySQL Forums
Forum List  »  Newbie

Re: Finding Null
Posted by: Barry Galbraith
Date: March 15, 2023 02:32AM

NULL is not equal to anything, even NULL.
To check for NULL use IS NULL.

https://dev.mysql.com/doc/refman/8.0/en/comparison-operators.html#operator_is-null

SELECT COUNT(ITEM) FROM Invoices01 AS V1 WHERE invnbr IS NULL;

Good luck,
Barry.

Options: ReplyQuote


Subject
Written By
Posted
March 14, 2023 01:18PM
Re: Finding Null
March 15, 2023 02:32AM
March 15, 2023 03:21PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.