MYSQL: Concat two tables
Posted: Sun May 09, 2010 12:49 pm
Hi,
I have two tables, for instance,
Table 1
======
id_1 / title_1 / date_1
-------------------------
1 / A / xxx
2 / B / xxx
Table 2
======
id_2 / title_2 / date_2
-------------------------
1 / C / xxx
2 / D / xxx
How can make make the query so that I can have this result that it is i sorted by date,
id / title / date
-------------------------
1 / A / xxx
2 / C / xxx
1 / B / xxx
2 / D / xxx
Is it possible?
I tried to JOIN or to LEFT JOIN them, but it won't get the result I am looking for, is there any other SQL syntax I can try??
Many thanks,
Lau
I have two tables, for instance,
Table 1
======
id_1 / title_1 / date_1
-------------------------
1 / A / xxx
2 / B / xxx
Table 2
======
id_2 / title_2 / date_2
-------------------------
1 / C / xxx
2 / D / xxx
How can make make the query so that I can have this result that it is i sorted by date,
id / title / date
-------------------------
1 / A / xxx
2 / C / xxx
1 / B / xxx
2 / D / xxx
Is it possible?
I tried to JOIN or to LEFT JOIN them, but it won't get the result I am looking for, is there any other SQL syntax I can try??
Many thanks,
Lau