Re: Need SQL guru's help: Best query?

From: Chris Fischer <cfischer_at_nando.net>
Date: 1996/03/25
Message-ID: <4j65bp$fee_at_castle.nando.net>#1/1


cdye_at_dnt.dialog.com (Charles Dye (PC)) wrote:

>SELECT model_number, min(model_number)
>FROM model_table
>group by model_number
>order by model_number
>/

In this case, the ORDER BY clause is redundant and unnecessary as to do the GROUP BY oracle will already sort the rows. Adding the order by simply causes oracle to sort the rows again.

+------------------------------------------------------------+
| Chris Fischer                           cfischer_at_nando.net |
| Sr. Systems Analyst                    Work: (919)676-0062 |
| Toys "R" Us                                                |
+------------------------------------------------------------+
Received on Mon Mar 25 1996 - 00:00:00 CET

Original text of this message