討論串[SQL ] 請問要如何搜尋兩張資料表
共 3 篇文章
首頁
上一頁
1
下一頁
尾頁

推噓0(0推 0噓 3→)留言3則,0人參與, 最新作者phreat (雷)時間14年前 (2011/09/01 01:17), 編輯資訊
0
0
0
內容預覽:
很感謝chunhsiang 的解惑. 剛測試過可行,但遇有個小小問題是兩張10萬筆的資料做此動作大概需要跑3-4秒. 所以最後改寫成. select a.id as id, a.enable as enable. from a. where a.enable is not null. 輸出成陣列 a

推噓0(0推 0噓 1→)留言1則,0人參與, 最新作者chunhsiang (= =)時間14年前 (2011/08/31 18:38), 編輯資訊
0
0
0
內容預覽:
select a.id as id, a.enable as enable. from a. where a.enable is not null. union all. select b.id, b.enable. from b. where b.enable is not null. ;. --

推噓0(0推 0噓 0→)留言0則,0人參與, 最新作者phreat (雷)時間14年前 (2011/08/31 16:54), 編輯資訊
0
0
0
內容預覽:
請問一下. 以下為兩張表. table a. id enable. 1. 2 1. 3 1. 4 1. table b. id enable. 4 1. 5 1. 6 1. 請問有辦法印出. id enable. 2 1. 3 1. 4 1. 4 1. 5 1. 6 1. 測試過FULL JOIN
(還有1個字)
首頁
上一頁
1
下一頁
尾頁