CREATE TABLE [dbo].[md_grids_summaries_functions]
(
[gsf_function_code] [dbo].[ais_code_short] NOT NULL,
[gsf_l1] [nvarchar] (64) COLLATE French_CI_AS NOT NULL,
[gsf_l2] [nvarchar] (64) COLLATE French_CI_AS NULL,
[gsf_l3] [nvarchar] (64) COLLATE French_CI_AS NULL,
[gsf_sys] [bit] NOT NULL CONSTRAINT [DF__md_grids_summaries_functions__gsf_sys] DEFAULT ((0))
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[md_grids_summaries_functions] ADD CONSTRAINT [CK__md_grids_summaries_functions_gsf_function_code__string_pk] CHECK ((len(ltrim(rtrim([gsf_function_code])))>(0) AND charindex('*',[gsf_function_code])=(0) AND charindex('%',[gsf_function_code])=(0)))
GO
ALTER TABLE [dbo].[md_grids_summaries_functions] ADD CONSTRAINT [PK_md_grids_summaries_functions] PRIMARY KEY CLUSTERED  ([gsf_function_code]) ON [PRIMARY]
GO
