i guess what i'm trying to understand is what's happening in the background: what if you did left or right join for example? what would mysql set the values to for rows that have no matches? i'm trying to understand the mechanics of what is going on in the background. would it be null, for example, in the left join scenario where tbl2 does not have a matching row?
–
AlexAug 15 '12 at 0:35

If tbl2 does not have a matching row, then a.val will be set to NULL.
–
Gordon LinoffAug 15 '12 at 0:37

then how would an update with an inner join vs. a left join be different? it seems they are the same thing here.
–
AlexAug 15 '12 at 2:04

Q: What happens to the records in tbl1 that do not have a match in tbl2?

A: They will not be updated since they have no match from tbl2. From the definition, the INNER JOIN keyword return rows when there is at least one match in both tables. The only keyword that could delete record from your table is the DELETE DML.