从两个表中提取数据并按日期排序

时间:2010-05-25 19:04:24

标签: mysql

我有两个单独的表:

表1 - id,news,date_added
表2 - id,news,extra,date_added

是否可以查询表和提取数据ORDER BY date_added
感谢

1 个答案:

答案 0 :(得分:1)

试试这个

select id, news, date_added,"" as extra
from table1
union all
select id, news, date_added,extra
from table1
ORDER BY date_added