将数据与不同列组合在一起
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 个记录集与不同列组合时,使用默认值模拟缺失的记录集。