View Single Post
  #2 (permalink)  
Old 07-20-09, 07:26
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,083
DISTINCT is ~not~ a function

if you put a column in parentheses after DISTINCT, that does not change what DISTINCT does -- DISTINCT applies to all columns in the SELECT clause

DISTINCT is implemented by a sort on the result set, sorting on all columns, then looking for duplicate rows, i.e. duplicate in all columns
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote