Mysql – Inner join or cross join Confusion

join;MySQL

For example select * from a inner join b on a.i=b.i ; is definitely inner join.

But can you let me know whether the below statements belongs to cross join or inner join ?

select * 
from a ,b 
where a.i=b.i;

select * 
from a ,b 
on a.i=b.i;

Thanks,
Kasi.

Best Answer

It's a matter of definition.

select * 
from a ,b

is a CROSS JOIN.

select * 
from a ,b 
where a.i=b.i;

is equivalent with both:

select * 
from a
cross join b 
where a.i=b.i;

and:

select * 
from a
inner join b 
    on a.i=b.i;

so in a sense, it is both an INNER JOIN and a CROSS JOIN with a filtering WHERE clause.