CREATE TABLE [dbo].[nm_products_variables_types]
(
[nmpvt_type_code] [dbo].[ais_code_short] NOT NULL,
[nmpvt_l1] [nvarchar] (64) COLLATE French_CI_AS NOT NULL,
[nmpvt_l2] [nvarchar] (64) COLLATE French_CI_AS NULL,
[nmpvt_l3] [nvarchar] (64) COLLATE French_CI_AS NULL,
[nmpvt_sys] [bit] NOT NULL CONSTRAINT [DF__nm_products_variables_types__nmpvt_sys] DEFAULT ((0)),
[nmpvt_company] [bit] NOT NULL CONSTRAINT [DF__nm_products_variables_types__nmpvt_company] DEFAULT ((0)),
[nmpvt_policy] [bit] NOT NULL CONSTRAINT [DF__nm_products_variables_types__nmpvt_policy] DEFAULT ((0)),
[nmpvt_risk] [bit] NOT NULL CONSTRAINT [DF__nm_products_variables_types__nmpvt_risk] DEFAULT ((0)),
[nmpvt_peril] [bit] NOT NULL CONSTRAINT [DF__nm_products_variables_types__nmpvt_peril] DEFAULT ((0)),
[nmpvt_is_broker_cost] [bit] NOT NULL CONSTRAINT [DF__nm_products_variables_types__nmpvt_is_broker_cost] DEFAULT ((0)),
[nmpvt_is_broker_fee] [bit] NOT NULL CONSTRAINT [DF__nm_products_variables_types__nmpvt_is_broker_fee] DEFAULT ((0)),
[nmpvt_is_company_cost] [bit] NOT NULL CONSTRAINT [DF__nm_products_variables_types__nmpvt_is_company_cost] DEFAULT ((0)),
[nmpvt_is_company_fee] [bit] NOT NULL CONSTRAINT [DF__nm_products_variables_types__nmpvt_is_company_fee] DEFAULT ((0)),
[nmpvt_frt] [bit] NOT NULL CONSTRAINT [DF__nm_products_variables_types__nmpvt_frt] DEFAULT ((0))
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[nm_products_variables_types] ADD CONSTRAINT [CK__nm_products_variables_types_nmpvt_type_code__string_pk] CHECK ((len(ltrim(rtrim([nmpvt_type_code])))>(0) AND charindex('*',[nmpvt_type_code])=(0) AND charindex('%',[nmpvt_type_code])=(0)))
GO
ALTER TABLE [dbo].[nm_products_variables_types] ADD CONSTRAINT [PK_nm_products_variables_types] PRIMARY KEY CLUSTERED  ([nmpvt_type_code]) ON [PRIMARY]
GO
