1, null and any operator are null after operation
Normal values are generally possible operator operations, but for example: ID is listed as int, so you can: id=id+1, etc., but if the value of a column is Null,null+1=null
For example
Update Testnull
Set b=b+1
where B is null
The query found that the value of B did not change and is still null.
2. Returns False if any value is compared to null
The normal value can be "=" operation, for example, the condition usually appears: Susername= ' Zhang San ', if the value of sUserName is null, if you want to find all the names of NULL records, it can not be used: Susername=null, Because NULL is not a specific value, any value that is compared to it will return false. You can now borrow is null or is isn't null.
For example
SELECT * from Testnull where A=null --Returns an empty result set
SELECT * from testnull where B is null --return result set 2 2 NULL
Indicates that null cannot be compared with "=" and can be replaced by IS null
3. When a statistical record contains a null value, it ignores the null value
For example, the statistics function count will be different, such as Count (ID): Count Records. When a statistical record contains a null value, it ignores the null value.
4, for in the impact of different
Example query: Query the record in the Testnull table that contains the value of B in null.
SELECT * from Testnull where B in (null) --No record
In the query, NULL records are ignored, and the query can be queried with is not NULL.
5. The order of sorting is different
When an order by is used, a null value is first rendered. If you sort in descending order with DESC, the null value is displayed last.
Reference: How SQL Server determines null http://www.studyofnet.com/news/1056.html
SQL Server null values need to be noted in place