# using comma
mysql> select id,pw from users
+-------+-------+
| id | pw |
+-------+-------+
| admin | admin |
| guest | guest |
+-------+-------+
2 rows in set (0.01 sec)
# without comma
mysql> select * fom (select id from user)a join (select pw from user)b;
+-------+-------+
| id | pw |
+-------+-------+
| admin | admin |
| guest | admin |
| admin | guest |
| guest | guest |
+-------+-------+
4 rows in set (0.01 sec)
# union select without comma
mysql> select id,pw from user union select * from (select 1)a join (select 2)b;
+-------+-------+
| id | pw |
+-------+-------+
| admin | admin |
| guest | guest |
| 1 | 2 |
+-------+-------+
3 rows in set (0.00 sec)