create trigger goodsdelete
on goods
after delete
as
delete from orders
where goodsname in
(select name from deleted)