File: README.distinct

package info (click to toggle)
firebird3.0 3.0.13.ds7-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 42,632 kB
  • sloc: ansic: 374,403; cpp: 319,973; sql: 14,691; pascal: 14,532; yacc: 7,557; fortran: 5,645; sh: 5,336; makefile: 1,041; perl: 194; sed: 83; awk: 76; xml: 19; csh: 15
file content (27 lines) | stat: -rw-r--r-- 813 bytes parent folder | download | duplicates (16)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
------------------
DISTINCT predicate
------------------

  Function:
    Specify a test of whether two row values are distinct.

  Author:
    Oleg Loa <loa@mail.ru>
    Dmitry Yemanov <yemanov@yandex.ru>

  Syntax rules:
    <value> IS [NOT] DISTINCT FROM <value>

  Scope:
    DSQL, PSQL

  Example(s):
    1. SELECT * FROM T1 JOIN T2 ON T1.NAME IS NOT DISTINCT FROM T2.NAME;
    2. SELECT * FROM T WHERE T.MARK IS DISTINCT FROM 'test'

  Note(s):
    1. A DISTINCT predicate evaluates very similar to an equality predicate with
       the only difference that two NULL values are considered not distinct. As a result,
       this predicate never evaluates to UNKNOWN truth value (the same as IS [NOT] NULL
       predicate behaves).
    2. The NOT DISTINCT predicate can be optimized via an index, if exists.