我有一个包含几列的表格,我想要SELECT
:
SELECT his_name , her_name, other_name FROM foo;
Run Code Online (Sandbox Code Playgroud)
但是,我想将所有结果合并到一个列中。举个例子,我可以做到这一点UNION ALL
的
SELECT her_name AS name FROM foo
UNION ALL
SELECT his_name AS name FROM foo
UNION ALL
SELECT other_name AS name FROM foo
Run Code Online (Sandbox Code Playgroud)
有没有更优雅的方法来做这个操作?