AdobeStock_455007340

Distinct Counting with SQL COUNT()

The SQL DISTINCT keyword forces SELECT operations to be performed on unique rows (ignoring duplicate values). If you are counting rows (using the COUNT() aggregate function) then DISTINCT may only be used if a column name is specified. DISTINT may not be used with COUNT(*). (Applies to: ColdFusion All)

Leave a Reply

Discover more from Ben Forta

Subscribe now to keep reading and get access to the full archive.

Continue reading