更新时间:2021-11-08 21:52:07
你可以这样使用:
SELECT age, name
FROM users
UNION
SELECT 25 AS age, 'Betty' AS name
使用 UNION ALL
允许重复:如果您的用户中有 25 岁的 Betty,则第二个查询将不会仅使用 UNION
再次选择她.
Use UNION ALL
to allow duplicates: if there is a 25-years old Betty among your users, the second query will not select her again with mere UNION
.