---- Addresses - FOR DELETE ----
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[OnAddressesDelete]') and xtype = N'TR')
drop trigger [dbo].[OnAddressesDelete]
GO
CREATE TRIGGER OnAddressesDelete ON [dbo].[Addresses] 
FOR DELETE 
AS
  if (SELECT Count(*) FROM DELETED) > 0 
    DELETE FROM AddressExtraParts WHERE ExtraPartID IN (SELECT ExtraPartID FROM DELETED)