I have two tables, Table_1
with 4 columns (3 primary key) and Table_2
with 2 column. When I try to create a foreign key constraint in Table_2
, I am getting this error:
Here are the definitions of my tables:
Table_1
CREATE TABLE [dbo].[Table_1]
(
[Field_1] [tinyint] NOT NULL,
[Field_2] [tinyint] NOT NULL,
[Field_3] [tinyint] NOT NULL,
[Field_4] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
CONSTRAINT [PK_Table_1] PRIMARY KEY CLUSTERED
(
[Field_1] ASC,
[Field_2] ASC,
[Field_3] ASC
)
Table_2
CREATE TABLE [dbo].[Table_2]
(
[Field_1] [tinyint] NOT NULL,
[Field_2] [tinyint] NOT NULL
) ON [PRIMARY]
Do you have any idea on how to solve this? Thanks -