如果A表记录被删除,B表相同关键字的记录也删除,可以:
如果数据库是SQL SERVER 则,在数据库中选择表,右键,“所有任务”-》“管理触发器”:
CREATE TRIGGER [触发器名] ON [dbo].[A] --是A表了
  FOR Delete
  AS --如果只有一个关键字则:
   delete from B表 where 关键字 in (select 关键字 from deleted)
     --如果多个关键字则:
   delete from B表 where 关键字1 in (select 关键字1 from deleted) and
                         关键字2 in (select 关键字2 from deleted)