Run the following SQL statement to create the relational table and add the foreign key constraints to allow automatic cascaded deletion.
CopySQL
CREATE TABLE [dbo].[Table_ProjectsContacts_Mapping]( [ID] [int] IDENTITY(1,1) NOT NULL, [ID_Project] [int] NOT NULL, [ID_Contact] [int] NOT NULL, CONSTRAINT [PK_Table_ProjectsContacts_Mapping] PRIMARY KEY CLUSTERED ( [ID] ASC )WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY] ) ON [PRIMARY] ALTER TABLE [dbo].[Table_ProjectsContacts_Mapping] WITH CHECK ADD CONSTRAINT [FK_Table_ProjectsContacts_Mapping_Table_EntitiesBase] FOREIGN KEY([ID_Project]) REFERENCES [dbo].[Table_EntitiesBase] ([ID]) ON DELETE CASCADE GO ALTER TABLE [dbo].[Table_ProjectsContacts_Mapping] WITH CHECK ADD CONSTRAINT [FK_Table_ProjectsContacts_Mapping_Table_Users] FOREIGN KEY([ID_Contact]) REFERENCES [dbo].[Table_Users] ([ID]) ON DELETE CASCADE