Though my sql knowledge is pretty good, I cannot get my head around the difference in a left
vs inner
join
specifically when doing an update
.
employee_table
column1:id
column2:socialsecurity
private_info_table
column1:id
column2:socialsecurity
I need to update employee_table.socialsecurity
to be private_info_table.socialsecurity
should I do a left or inner join: ???
update e
set e.socialsecurity=p.socialsecurity
from employee_table e
join private_info_table p --should this be left or inner join?
on p.id=e.id