[PLUG] Re: SQL Syntax

alan alan at clueserver.org
Mon Nov 6 21:19:21 UTC 2006


On Mon, 6 Nov 2006, Randal L. Schwartz wrote:

>>>>>> "Mark" == Mark A Turner <turner at glsuite.com> writes:
>
> Mark> ORDER BY is based on the table your selecting from, not the data your
> Mark> selecting.
>
> I'm with Russell on this.  ORDER BY is looking at the result set,
> not the original table.  If you don't select something, you can't
> ORDER BY it.
>
> As an indication of that, I often use "ORDER BY 2" to order by the second
> column of the result rows.

I thought that was only usable in DB2.  I guess not.

-- 
Q: Why do programmers confuse Halloween and Christmas?
A: Because OCT 31 == DEC 25



More information about the PLUG mailing list