In SQL / MySQL, what is the difference between “ON” and “WHERE” in a join statement?
问题 The following statements give the same result (one is using on , and the other using where ): mysql> select * from gifts INNER JOIN sentGifts ON gifts.giftID = sentGifts.giftID; mysql> select * from gifts INNER JOIN sentGifts WHERE gifts.giftID = sentGifts.giftID; I can only see in a case of a Left Outer Join finding the \"unmatched\" cases: (to find out the gifts that were never sent by anybody) mysql> select name from gifts LEFT OUTER JOIN sentgifts ON gifts.giftID = sentgifts.giftID WHERE