README.nullif 514 B

1234567891011121314151617181920212223
  1. Function:
  2. Return a NULL value for a sub-expression if it has a specific value
  3. otherwise return the value of the sub-expression
  4. Author:
  5. Arno Brinkman <[email protected]>
  6. Format:
  7. <case abbreviation> ::=
  8. NULLIF <left paren> <value expression> <comma> <value expression> <right paren>
  9. Syntax Rules:
  10. 1) NULLIF (V1, V2) is equivalent to the following <case specification>:
  11. CASE WHEN V1 = V2 THEN NULL ELSE V1 END
  12. Examples:
  13. A)
  14. UPDATE PRODUCTS
  15. SET STOCK = NULLIF(STOCK,0)