I have a many-to-many table that contains id's from 2 related tables.
For creating a primary key on this table, is it better to create another integer column and have that as a surrogate PK?
Or should I create the PK on both id columns?
What are the benefits of either method?
Here is the table design with the surrogate key (CodeGroupMappingID)
CREATE TABLE [dbo].[CodeGroupMappings]( [CodeGroupMappingID] [int] IDENTITY(1,1) NOT NULL, [CodeID] [int] NOT NULL, [GroupID] [int] NOT NULL, CONSTRAINT [PK_CodeGroupMappings_CodeGroupMappingID] PRIMARY KEY CLUSTERED ([CodeGroupMappingID] ASC) )