If I read you correctly, your TABLE1 is a list of males, while TABLE2 is a list of students of both genders, so if table 1 contains the name of a student, then that student is a male and you want to update the column?
Update table2
Set Gender = 'male'
where exists
(
select 1 from table1 where table1.name = table2.name
)