CREATE TABLE [dbo].[md_dictionaries_fields_cpl]
(
[dictfc_dictionary_code] [dbo].[ais_code_short] NOT NULL,
[dictfc_table_name] [dbo].[ais_name] NOT NULL,
[dictfc_field_name] [dbo].[ais_name] NOT NULL,
[dictfc_string] [nvarchar] (255) COLLATE French_CI_AS NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[md_dictionaries_fields_cpl] ADD CONSTRAINT [PK_md_dictionaries_fields_cpl] PRIMARY KEY CLUSTERED  ([dictfc_dictionary_code], [dictfc_table_name], [dictfc_field_name]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[md_dictionaries_fields_cpl] ADD CONSTRAINT [FK_md_dictionaries_fields_cpl_md_dictionaries] FOREIGN KEY ([dictfc_dictionary_code]) REFERENCES [dbo].[md_dictionaries] ([dict_dictionary_code])
GO
ALTER TABLE [dbo].[md_dictionaries_fields_cpl] ADD CONSTRAINT [FK_md_dictionaries_fields_cpl_md_fields_cpl] FOREIGN KEY ([dictfc_table_name], [dictfc_field_name]) REFERENCES [dbo].[md_fields_cpl] ([fld_table_name], [fld_field_name])
GO
