我的 Google-Fu 在这方面很弱,所以也许你们都可以帮忙。
如果要选择多个列,可以执行...
SELECT 'something' as userName, 'fooBar' as typicalSaying
你会得到:
+----------------+-----------------+
| userName | typicalSaying |
+----------------+-----------------+
| something | fooBar |
+----------------+-----------------+
但是,如何对行进行上述操作?
例如:
SELECT someLine, effy.text from table
LEFT JOIN (SELECT 'a' as text UNION 'b' UNION 'c') as effy
编辑: 要得到像..
+----------------+--------------+
| someLine | effy.text |
+----------------+--------------+
| entryA | a |
| entryA | b |
| entryA | c |
+----------------+--------------+