开发者

Extract data from two tables and order by date

开发者 https://www.devze.com 2023-01-01 13:17 出处:网络
I have two开发者_如何学JAVA seperate tables: Table1 - id, news, date_added Table2 - id, news, extra, date_added

I have two开发者_如何学JAVA seperate tables:

Table1 - id, news, date_added

Table2 - id, news, extra, date_added

Is it possible to query both table and extract data ORDER BY date_added

Thanks


try this

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

精彩评论

暂无评论...
验证码 换一张
取 消