If you are using SQL Server you can write a FOR DELETE trigger on the table 'contact'. Try this: - -------------------------------------------------------------------------------------------------- CREATE PROCEDURE DeleteContact @consultantid int AS DELETE FROM contact WHERE consultantid=@consultantid -------------------------------------------------------------------------------------------------- Now create a trigger on the table 'contact': - -------------------------------------------------------------------------------------------------- CREATE TRIGGER DeleteAddress ON contact FOR DELETE AS CREATE TABLE #DeletedContacts ( consultantid int ) INSERT INTO #DeletedContacts SELECT consultantid FROM deleted DELETE FROM address WHERE consultantid IN (SELECT consultantid FROM deleted) -------------------------------------------------------------------------------------------------- Now, you execute the stored procedure: EXEC DeleteContact After it deletes from the table 'contact' the trigger will be excuted and it will delete corresponsing rows from the table 'address'.
I am a Software Developer using C# on ASP.NET.