ALTER TABLE [dbo].[REF_GROUPS_DATA_SECURITY_SETTINGS] DROP CONSTRAINT [FK_GROUPID]
GO
ALTER TABLE [dbo].[REF_GROUPS_DATA_SECURITY_SETTINGS] ADD CONSTRAINT [FK_GROUPID] FOREIGN KEY ([GroupId]) REFERENCES [dbo].[REF_GROUPS] ([Ndx]) ON DELETE CASCADE