mysql>
mysql> SELECT *
-> FROM (SELECT 'John' AS FIRST_NAME
-> UNION
-> SELECT 'Mark'
-> UNION
-> SELECT 'Arnold') AS FIRST_NAMES,
-> (SELECT 'Berg' AS LAST_NAME
-> UNION
-> SELECT 'Johnson'
-> UNION
-> SELECT 'Williams') AS LAST_NAMES;
+------------+-----------+
| FIRST_NAME | LAST_NAME |
+------------+-----------+
| John | Berg |
| Mark | Berg |
| Arnold | Berg |
| John | Johnson |
| Mark | Johnson |
| Arnold | Johnson |
| John | Williams |
| Mark | Williams |
| Arnold | Williams |
+------------+-----------+
9 rows in set (0.00 sec)
mysql>