This query should return all records with equal names:
SELECT COALESCE(t2.sno, t1.sno) AS NewSno, t2.name
FROM table1 AS t1 INNER JOIN table2 as t2 ON t1.name = t2.name
For further information about different types of joins, please read this:
Visual Representation of SQL Joins[
^]
COALESCE[
^]