In SQL, the DISTINCT keyword eliminates redundant rows in the the output. By redundant, I mean that the query engine looks at each value in each column and returns only unique combinations of values. Perhaps an example would demonstrate this better.

   SELECT DISTINCT noder_name FROM nodes;

The output from the query above would be a list of all unique values for the column noder_name. If noder_name "novasoy" had 180 records in the nodes table, the DISTINCT keyword would ignore 179 of them. You would have a list of the authors of all nodes in the nodes table. The output might look like this:


In a query where multiple columns are specified, DISTINCT returns only unique combinations of the columns. For instance, in this query

   SELECT DISTINCT noder_name, node_type FROM nodes;
the output would be all unique combinations of the two columns. It might look like this:
noder_name          node_type
----------          ---------
novasoy             idea
novasoy             thing
novasoy             person
siouxsie            idea
siouxsie            person

Dis*tinct" (?), a. [L. distinctus, p. p. of distinguere: cf. F. distinct. See Distinguish.]


Distinguished; having the difference marked; separated by a visible sign; marked out; specified.


Wherever thus created -- for no place Is yet distinct by name. Milton.


Marked; variegated.


The which [place] was dight With divers flowers distinct with rare delight. Spenser.


Separate in place; not conjunct; not united by growth or otherwise; -- with from.

The intention was that the two armies which marched out together should afterward be distinct. Clarendon.


Not identical; different; individual.

To offend, and judge, are distinct offices. Shak.


So separated as not to be confounded with any other thing; not liable to be misunderstood; not confused; well-defined; clear; as, we have a distinct or indistinct view of a prospect.

Relation more particular and distinct. Milton.

Syn. -- Separate; unconnected; disjoined; different; clear; plain; conspicuous; obvious.


© Webster 1913.

Dis*tinct" (?), v. t.

To distinguish.


Rom. of R.


© Webster 1913.

Log in or register to write something here or to contact authors.