Re: [SQL ] 請問從五個資料表內抓最新的五筆SQL怎麼下

看板Database作者 (找尋蔚藍天空)時間18年前 (2007/11/01 22:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/7 (看更多)
select * from ( (select * from board1 order by posttime limit 5) union (select * from board2 order by posttime limit 5) union (select * from board3 order by posttime limit 5) union (select * from board4 order by posttime limit 5) union (select * from board5 order by posttime limit 5) union ) AS U order by posttime limit 5; 這樣? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 59.121.23.85 ※ 編輯: pakker 來自: 59.121.23.85 (11/01 22:21)
文章代碼(AID): #17ATnC6S (Database)
討論串 (同標題文章)
文章代碼(AID): #17ATnC6S (Database)