Re: Joining and then ordering by a common column
- From: "lennart@xxxxxxxxxxxxxxxxxxx" <lennart@xxxxxxxxxxxxxxxxxxx>
- Date: 24 Aug 2005 12:12:50 -0700
MrKrinkle wrote:
> Hmm, it's interesting but I don't think I can make use of that output-
> I just get a list of ages without knowing what they correspond to. I
> tried adding the uid's of the tables, but the uid's merge together in
> the results, so you don't know whether it's a tableA uid or a tableB
> uid.
How about:
SELECT age, 'tableA' as source FROM age1
UNION
SELECT age, 'tableB' as source FROM age2
ORDER BY age
/Lennart
.
- Follow-Ups:
- Re: Joining and then ordering by a common column
- From: MrKrinkle
- Re: Joining and then ordering by a common column
- References:
- Joining and then ordering by a common column
- From: MrKrinkle
- Re: Joining and then ordering by a common column
- From: Stefan Rybacki
- Re: Joining and then ordering by a common column
- From: MrKrinkle
- Joining and then ordering by a common column
- Prev by Date: Re: Joining and then ordering by a common column
- Next by Date: Re: Joining and then ordering by a common column
- Previous by thread: Re: Joining and then ordering by a common column
- Next by thread: Re: Joining and then ordering by a common column
- Index(es):
Relevant Pages
|
|