NastiaMurzin, Not only is that answer wrong, it is dangerous. What you have there is a cross join which will match each record of table1 to each record of table2. So if table 1 had ten records and table 2 had 20, you might expect to get 20 back, but the cross join woul return 200. Now start thinking about what it would do if each table had a million records to see whay this is a problem.
This is a prime example of why the implicit join syntax (which is 18 years out-of-date BTW) should never be used. Accidental cross joins are too easy to get.
Further select * is a poor practice as well espcially when you have a join. You returning the same value in at least two columns (the join columns, assuming you didn't do a cross join) and that is a waste of both server and network resources. I would never allow this kind of junk programming to be put on my production machines.
"NOTHING is more important in a database than integrity." ESquared