Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: beginner sql question
Ed Prochak <edprochak_at_adelphia.net> wrote:
>
> and just to toss in my 2cents (take this as a hint ksmith):
>
> I think DISTINCT is the most misused feature of SQL.
>
> It tends to hide logic errors. And often, even a quick query can use a
> COUNT(*) instead to gain a slight bit more information at no greater
> performance cost.
I would use count(*) more in ad hoc queries if it would automatically infer all non-aggregate selected columns to be in the 'group by' if a 'group by' wasn't explicitly given. The benefit of distinct is that I only have to tell it what columns I want once.
Xho
-- -------------------- http://NewsReader.Com/ -------------------- Usenet Newsgroup ServiceReceived on Sun Oct 06 2002 - 17:33:20 CDT