Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: beginner sql question

Re: beginner sql question

From: <ctcgag_at_hotmail.com>
Date: 06 Oct 2002 22:33:20 GMT
Message-ID: <20021006183320.064$yG@newsreader.com>


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 Service
Received on Sun Oct 06 2002 - 17:33:20 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US