1

I can do a single select by itself where there is no table:

select "hi" as "col";

+-----+
| col |
+-----+
| hi  |
+-----+
1 row in set (0.00 sec)

What I would like to do is the same thing, but have two or more results, such as:

select ???;

+-----+
| col |
+-----+
| hi  |
+-----+
| lo  |
+-----+
2 rows in set (0.00 sec)

Any ideas on how to select an array of things from nothing? Want to use this construct to do a mass insert without having to list every row by hand. Data isn't in the DB anywhere already.

Jason
  • 12,288
  • 14
  • 67
  • 121
  • You're going to have to list every row regardless. Why are you complaining about the notation? – tadman Jun 30 '15 at 17:31

1 Answers1

4
select 'hi' as col
union all
select 'lo'
juergen d
  • 195,137
  • 36
  • 275
  • 343