Content deleted Content added
m v2.03b - Bot T19 CW#83 - WP:WCW project (Heading start with three "=" and later with level two) |
→Overview: mention that DISTINCT is a type of GROUP BY |
||
Line 55:
| quote = [...] the keyword DISTINCT [...] eliminates the duplicates from the result set.
}}
</ref> Note that <code>DISTINCT</code> is an example of [[syntactic sugar]]: it is possible to achieve the same result by listing all selected columns (but not the aggregate functions, if any) in the <code>GROUP BY</code> clause.
The following example of a <code>SELECT</code> query returns a list of expensive books. The query retrieves all rows from the ''Book'' table in which the ''price'' column contains a value greater than 100.00. The result is sorted in ascending order by ''title''. The asterisk (*) in the ''select list'' indicates that all columns of the ''Book'' table should be included in the result set.
|