Creating a multi-row "table" as part of a SELECT
- by Chad Birch
I'm not really sure how to describe my question (thus the awful title), but it's related to this recent question.
The problem would be easily solved if there was some way for me to create a "table" with 4 rows as part of my SELECT (to use with NOT IN or MINUS).
What I mean is, I can do this:
SELECT 1, 2, 3, 4;
And will receive one row from the database:
| 1 | 2 | 3 | 4 |
But is there any way to receive the following (without using UNION, I don't really want a query that's potentially thousands of lines long with a long list)?
| 1 |
| 2 |
| 3 |
| 4 |