README.distinct 813 B

123456789101112131415161718192021222324252627
  1. ------------------
  2. DISTINCT predicate
  3. ------------------
  4. Function:
  5. Specify a test of whether two row values are distinct.
  6. Author:
  7. Oleg Loa <[email protected]>
  8. Dmitry Yemanov <[email protected]>
  9. Syntax rules:
  10. <value> IS [NOT] DISTINCT FROM <value>
  11. Scope:
  12. DSQL, PSQL
  13. Example(s):
  14. 1. SELECT * FROM T1 JOIN T2 ON T1.NAME IS NOT DISTINCT FROM T2.NAME;
  15. 2. SELECT * FROM T WHERE T.MARK IS DISTINCT FROM 'test'
  16. Note(s):
  17. 1. A DISTINCT predicate evaluates very similar to an equality predicate with
  18. the only difference that two NULL values are considered not distinct. As a result,
  19. this predicate never evaluates to UNKNOWN truth value (the same as IS [NOT] NULL
  20. predicate behaves).
  21. 2. The NOT DISTINCT predicate can be optimized via an index, if exists.