README.nullif 611 B

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