dimanche 17 juillet 2016

Difference between using "ON .. AND" and "WHERE" in LEFT JOIN

Are these two queries effectively same or any difference between them from execution perspective? If they are same would there be any performance difference between these two?

1.

SELECT * 
FROM TABLE_A tbl_a 
LEFT JOIN TABLE_B tbl_b ON (tbl_a.srno_a = tbl_b.srno_b) 
AND tbl_a.srno_a = 1997

and

2.

SELECT * 
FROM TABLE_A tbl_a 
LEFT JOIN TABLE_B tbl_b ON (tbl_a.srno_a = tbl_b.srno_b) 
WHERE tbl_a.srno_a = 1997

Aucun commentaire:

Enregistrer un commentaire