I want to use a select statement to retrieve multiple records without a reference table. Obviously it is easy to retrieve a single record is simple enough:
SELECT 'val_1' AS var1, 'val_2' AS var2;
+--------+--------+
| var1 | var2 |
+--------+--------+
| val_1 | val_2 |
+--------+--------+
But I need to produce multiple records without referencing any tables:
+--------+--------+
| var1 | var2 |
+--------+--------+
| val_1 | val_2 |
| val_3 | val_4 |
| val_5 | val_6 |
+--------+--------+
To retrieve multiple records without a reference table, you can use UNION operator provided by MySQL. It may serve your goal. Take an example:
SELECT 'val_1' AS var1, 'val_2' AS var2
UNION
SELECT 'val_3' AS var1, 'val_4' AS var2
UNION
SELECT 'val_5' AS var1, 'val_6' AS var2;