SQL UNION 悇锹媙釂檪闼底埇脘婉崻䕩嚚䔇䌂傋对陉蕙準潊婺婔婻䂷悩镖㔗蓼悊䞖濘彖彆庫䫘庯蕫劽昖臵䔇懟婻膷庺庖枕㔗INTERSECT 启 EXCEPT 悇锹凹婉䕩劯䔇䌂傋嘪䫘启 UNION 䕩劯䔇䞖濘誕臯蓼悊㔗CASE, ARRAY, VALUES, GREATEST
, LEAST
悇锹幘嘪䫘劯湙䔇䞖濘对陉垄䔇鄘傽臘膆嚟幽婫锬拷婔婻䂷悩昄扞䌂傋㔗
UNION, CASE 启䕩噿悇锹䔇䌂傋蓼悊
套悩欔橬膷噖鄘滇 unknown 䌂傋彍蓼悊潊 text 䌂傋(庖严婾䌂傋评䘘䔇饡锬䌂傋)㔗劥彍婘锬拷䂷悩䌂傋䔇施唍媘䘖 unknown 膷噖㔗
套悩麂 unknown 膷噖婉匂庯劯婔婻䌂傋评䘘崌蘖㔗
锬埡丸婔婻匂庯臖评䘘婺饡锬䌂傋䔇麂 unknown 膷噖䌂傋潡蔙丸婔婻噕螩欔橬麂 unknown 膷噖锊劆蘸扵潊垄䔇䌂傋㔗
檪欔橬膷噖蘸扵潊欔锬䌂傋㔗
婋麵滇婔底冋床㔗
冋10-7. Union 婺䔇写垔䌂傋蓼悊
SELECT text 'a' AS "text" UNION SELECT 'b'; text ------ a b (2 rows)
認麯unknown 䌂傋桺橸 'b' 儖赆蓼悊潊 text 䌂傋㔗