Database Reference
In-Depth Information
Figure 4.17
Using DISTINCT.
SELECT DISTINCT STATE_PROVINCE, COUNTRY FROM ARTIST;
The parentheses require a single concatenated string. Other functions
could be used within the parentheses, so long as a single string or value is
produced.
SELECT DISTINCT (STATE_PROVINCE||COUNTRY) FROM ARTIST;
SELECT ALL as opposed to SELECT DISTINCT is the default for the
SELECT statement and is therefore seldom used. SELECT ALL simply
lists all values, repeating or not, as opposed to only unique values.
4.3.5
Null Values
Some facts about null values are important to remember:
NULL represents nothing, not a space, not a zero (0), or even an
unknown value.
A space character or a 0 value are not NULL.
Null values are not included in binary tree (BTree) indexes.
 
Search WWH ::




Custom Search