CREATE TABLE [dbo].[Pri_Key](
[F_ID] [int] NOT NULL,
[S_ID] [int] NOT NULL,
[T_ID] [int] NOT NULL,
CONSTRAINT [PK_Pri_Key] PRIMARY KEY CLUSTERED
(
[F_ID] ASC,
[S_ID] ASC,
[T_ID] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
insert into Pri_Key values (1,1,1)
insert into Pri_Key values (1,1,2)
insert into Pri_Key values (1,1,3)
insert into Pri_Key values (1,1,4)
it will insert all these values as all the three values are not same and it will accept duplicate for the first 2 columns as the third column is diffrent but if all the three are going to be same
insert into Pri_Key values (1,1,4)
this will gives you an error...
Msg 2627, Level 14, State 1, Line 2
Violation of PRIMARY KEY constraint 'PK_Pri_Key'. Cannot insert duplicate key in object 'dbo.Pri_Key'.
hope this helps..