in reply to Re^2: (OT) MySQL query to limit and sort
in thread (OT) MySQL query to limit and sort
The baz is a table alias for the inner select, which I believe mysql requires (although I haven't verified if you can omit it). It allows you to explicitly name the columns in the outer select, e.g.
You can see there that it helps to disambiguate between foo.id and baz.id, that's why it's good that sub-selects can be named.select baz.id, foo.name from foo, -- regular table ( select id, frob from bar ) baz -- a sub-select where foo.id = baz.frob -- something that joins the two
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: (OT) MySQL query to limit and sort
by Anonymous Monk on Feb 04, 2006 at 05:24 UTC | |
by rhesa (Vicar) on Feb 06, 2006 at 01:31 UTC |