Can I use mysql JOIN without ON condition? -
i not learn how use join well. using server side code such objectives. possible write join query without on? how these joins differ left join, right join same things on examples.
mysql documentation covers topic.
here synopsis. when using join or inner join, on condition optional. different ansi standard , different other database. effect cross join. similarly, can use on clause cross join, differs standard sql.
a cross join creates cartesian product -- is, every possible combination of 1 row first table , 1 row second. cross join table 3 rows ('a', 'b', , 'c') , table 4 rows (say 1, 2, 3, 4) have 12 rows.
in practice, if want cross join, use cross join:
from cross join b is better than:
from a, b and:
from join b -- no on clause the on clause required right or left outer join, discussion not relevant them.
if need understand different types of joins, need studying on relational databases. stackoverflow not appropriate place level of discussion.
Comments
Post a Comment