msgbartop
News, views, tips and tricks on Oracle and other fun stuff
msgbarbottom

DISTINCT vs GROUP BY

Have you ever wondered about the difference between the use of DISTINCT and GROUP BY in your queries? I certainly have. Wonder no more. They are, for all intents and purposes, the same (as demonstrated by Tom).

Even though it requires more typing, but I prefer using GROUP BY (instead of DISTINCT when possible) as it is more explicit about what’s being unique or not in your result set.

Related articles:

Filed in Oracle on 27 Jun 05 | Tags: , ,


Comments are closed.