Videos
No sql server considers a NULL to be NULL. If you want to prevent a NULL from being inserted then make the column NOT NULL. Any type of equality check against a NULL value will always return NULL. It can't be greater than 0, less than 0 or equals 0 because the value is unknown.
Good catch man! but check constraint works that way, read along.
The CHECK constraints reject values that cause the Boolean expression evaluates to FALSE. Because NULL evaluates to UNKNOWN, it can be used in the expression to bypass a constraint.
For example, you can insert a product whose unit price is NULL as shown in the following query:
INSERT INTO test.products(product_name, unit_price)
VALUES ('Another Awesome Bike', NULL);
NULL is not a really value but it indicates missing tuple value.
Please try read NULL here.
Source: http://www.sqlservertutorial.net/sql-server-basics/sql-server-check-constraint/#targetText=SQL%20Server%20CHECK%20constraint%20and,expression%20to%20bypass%20a%20constraint.&targetText=SQL%20Server%20inserted%20NULL%20into,did%20not%20return%20an%20error.
See this stackoverflow answer as well.