Null attributes of result columns

Result columns allow null values if they are derived from:

  • Any aggregate function but COUNT and COUNT_BIG
  • Any column that allows null values
  • A scalar function or expression with an operand that allows null values
  • A host variable that has an indicator variable, an SQL parameter or variable, or in the case of Java™, a variable or expression whose type is able to represent a Java null value
  • A result of a UNION or INTERSECT if at least one of the corresponding items in the select list is nullable
  • An arithmetic expression in the outer select list
  • A scalar-fullselect
  • A user-defined scalar or table function
  • A GROUPING SETS grouping-expression