將資料與不同列組合在一起
SELECT name, caption as title, year, pages FROM books
UNION
SELECT name, title, year, 0 as pages FROM movies
將 2 個記錄集與不同列組合時,使用預設值模擬缺失的記錄集。
SELECT name, caption as title, year, pages FROM books
UNION
SELECT name, title, year, 0 as pages FROM movies
將 2 個記錄集與不同列組合時,使用預設值模擬缺失的記錄集。