[MYSQL] Combining rows from different tables
Posted: Thu Aug 18, 2011 7:36 am
I have two tables:
How can I combine the rows from each table so I can order by `num` descending?
This is the result I want:
Code: Select all
-----------------
| name | num |
-----------------
| herp | 30 |
| derp | 10 |
| werp | 50 |
-----------------
Code: Select all
-----------------
| name | num |
-----------------
| ferp | 40 |
| cerp | 20 |
| yerp | 60 |
-----------------
This is the result I want:
Code: Select all
-----------------
| name | num |
-----------------
| derp | 10 |
| cerp | 20 |
| herp | 30 |
| ferp | 40 |
| werp | 50 |
| yerp | 60 |
-----------------