Delete Trigger - Linking to a table with a PK made up of three columns
CREATE TABLE A
 (
     ID1 INT,
     ID2 INT,
     ID3 INT,
     FOO INT, 
     BAR INT,
     PRIMARY KEY (ID1, ID2, ID3)
 );

 CREATE TABLE B
 (
     ID1 INT,
     ID2 INT,
     ID3 INT,
     FOO INT, 
     BAR INT,
     PRIMARY KEY (ID1, ID2, ID3)
 );
 GO




 CREATE TRIGGER TRG_A_INSDEL
 ON [A]
 AFTER INSERT, DELETE
 AS
 BEGIN

     /* Insert new rows */
     INSERT INTO B
         SELECT * FROM inserted;

     /* Delete those rows that match PK */
     DELETE B
     FROM
         B
     JOIN
         deleted d
         ON d.ID1 = B.ID1
         AND d.ID2 = B.ID2
         AND d.ID2 = B.ID2;
 END
 GO




 INSERT INTO A VALUES (1, 1, 1, 1, 1);
 INSERT INTO A VALUES (2, 2, 2, 2, 2);
 INSERT INTO A VALUES (3, 3, 3, 3, 3);
 GO




SELECT * FROM B;
GO

ID1 | ID2 | ID3 | FOO | BAR
--: | --: | --: | --: | --:
  1 |   1 |   1 |   1 |   1
  2 |   2 |   2 |   2 |   2
  3 |   3 |   3 |   3 |   3




DELETE FROM A WHERE ID1 &gt;= 2;
GO




SELECT * FROM B;
GO

ID1 | ID2 | ID3 | FOO | BAR
--: | --: | --: | --: | --:
  1 |   1 |   1 |   1 |   1


db&lt;>fiddle here