Since you haven't shown us how exactly the tables are defined, you may want to look at this here example that explains it pretty well, I'd say: SQL Server – How to cascade UPDATEs and DELETEs to related tables
Hope this helps you!
To make your question clearer you should really add the DDL
] statements that create the two tables.
BTW, a strange thing is that you're using numbers in a column called name. I'd have thought a column with such a name to be varchar, nvarchar or some other text based type.