CREATE TABLE [dbo].[pr_families_cies]
(
[prfc_family_code] [dbo].[ais_code_short] NOT NULL,
[prfc_company_id] [int] NOT NULL
) ON [PRIMARY]
ALTER TABLE [dbo].[pr_families_cies] ADD
CONSTRAINT [FK_pr_families_cies_pr_families] FOREIGN KEY ([prfc_family_code]) REFERENCES [dbo].[pr_families] ([pf_family_code]) ON UPDATE CASCADE

GO
ALTER TABLE [dbo].[pr_families_cies] ADD CONSTRAINT [PK_pr_families_cies] PRIMARY KEY CLUSTERED  ([prfc_family_code], [prfc_company_id]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[pr_families_cies] ADD CONSTRAINT [FK_pr_families_cies_act_cies1] FOREIGN KEY ([prfc_company_id]) REFERENCES [dbo].[act_cies] ([cie_actor_id])
GO
