MySQL Chapter 3 - null processing

Null value is "do not know", "absence", the value "meaningless" is, the SQL language allows certain properties of some of the tuple null value under certain circumstances. The following circumstances:

  • This should have a value of the property, but they did not know its specific value.
  • This property should not have value.
  • For some reason inconvenient to fill

Null is a very special value, contain uncertainties .

  1. Generating null - Except generating null general, the outer connector will produce a null. Relational operators null values ​​will produce a null value.
  2. Determining a null value - a property value determination is empty, a is null or is not null represented.
  3. Null constraint - attribute definition (or domain definition) not null constraint has not null value, add unique restriction property can not null value, the code attribute value can not be emptied.
  4. Null value arithmetic, comparison operations, logic operations - and the other null value (which may be null) the result of arithmetic operation to a null value , the null value and another value (can be null) of comparing the calculation result for the Unknown , with the unknown, the traditional binary logic operations (ture, false) becomes logical to extend our three-valued logic .

In the query, only the where and having clause in the selection criteria is true of tuples was only selected as the output .

 

Guess you like

Origin www.cnblogs.com/lxx2/p/12576927.html