比較兩種集合運算
你在影片練習中學到,UNION ALL 會保留重複列,而 UNION 不會。在這個練習中,你會更深入比較,判斷在什麼情況下該使用 UNION,而不是 UNION ALL。
你將從 economies 與 populations 資料表中,觀察國家代碼與年份的各種組合。
本練習屬於課程
在 SQL 中進行資料連接
動手互動練習
試著完成這個範例程式碼,體驗一下這個練習。
-- Query that determines all pairs of code and year from economies and populations, without duplicates
___