select a.name1, b.name2 from table a join table b on a.id = b.id How, regardless of the value of the name2 field, to return only 1 record for each product?
there is no distinct name2 not repeated.
where b.name2 = 0 not, because The value of the field is not known. It can be any value.

select a.name1, (select top 1 name2 from table b where b.id = a.id) from table a- nick_n_a