I use this following query ,it works fine,but i have doubt about why we use 'ON' in this
select * from test_table
left outer join test_table_1 on test_table.id = test_table_1.ref_id
I use this following query ,it works fine,but i have doubt about why we use 'ON' in this
select * from test_table
left outer join test_table_1 on test_table.id = test_table_1.ref_id
There shouldnt be any doubt, 'on' is the syntax used to express the join predicate.
ON
clause describe the relation between those two tables. This is the base of the join (on which fieldd you want to join the tables.)
For more refer MySQL JOIN
Syntax.