CREATE TABLE [dbo].[act_cies_branches]
(
[cieb_company_id] [int] NOT NULL,
[cieb_branch_id] [int] NOT NULL,
[cieb_broker_code] [dbo].[ais_code_medium] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[act_cies_branches] ADD CONSTRAINT [PK_act_cies_branches] PRIMARY KEY CLUSTERED  ([cieb_company_id], [cieb_branch_id]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[act_cies_branches] ADD CONSTRAINT [FK_act_cies_branches_act_branches] FOREIGN KEY ([cieb_branch_id]) REFERENCES [dbo].[act_branches] ([br_actor_id])
GO
ALTER TABLE [dbo].[act_cies_branches] ADD CONSTRAINT [FK_act_cies_branches_act_cies] FOREIGN KEY ([cieb_company_id]) REFERENCES [dbo].[act_cies] ([cie_actor_id])
GO
