CREATE TABLE [dbo].[ShAttributeGroups]
(
[ShAttributeGroupID] [int] NOT NULL IDENTITY(1, 1),
[ShTrackingGroupID] [int] NOT NULL,
[ShAttributeID] [int] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ShAttributeGroups] ADD CONSTRAINT [PK_SHAttributeGroups] PRIMARY KEY CLUSTERED ([ShAttributeGroupID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ShAttributeGroups] ADD CONSTRAINT [FK_ShAttributeGroups_ShAttributeID_ShAttributes] FOREIGN KEY ([ShAttributeID]) REFERENCES [dbo].[ShAttributes] ([ShAttributeID])
GO
ALTER TABLE [dbo].[ShAttributeGroups] ADD CONSTRAINT [FK_ShAttributeGroups_ShTrackingGroupID_ShTrackingGroups] FOREIGN KEY ([ShTrackingGroupID]) REFERENCES [dbo].[ShTrackingGroups] ([ShTrackingGroupID])
GO