CREATE TABLE [dbo].[usr_profils]
(
[pr_profil_code] [dbo].[ais_code_short] NOT NULL,
[pr_rowver] [timestamp] NOT NULL,
[pr_l1] [nvarchar] (64) COLLATE French_CI_AS NOT NULL,
[pr_l2] [nvarchar] (64) COLLATE French_CI_AS NULL,
[pr_l3] [nvarchar] (64) COLLATE French_CI_AS NULL,
[pr_sys] [bit] NOT NULL CONSTRAINT [DF__usr_profils__pr_sys] DEFAULT ((0)),
[pr_freeze_allowed] [bit] NOT NULL CONSTRAINT [DF__usr_profils__pr_freeze_allowed] DEFAULT ((0)),
[pr_freeze] [bit] NOT NULL CONSTRAINT [DF__usr_profils__pr_freeze] DEFAULT ((0)),
[pr_admin] [bit] NOT NULL CONSTRAINT [DF__usr_profils__pr_admin] DEFAULT ((0)),
[pr_allow_save_grids_layout] [bit] NOT NULL CONSTRAINT [DF__usr_profils__pr_allow_save_grids_layout] DEFAULT ((0)),
[pr_short_code] [dbo].[ais_code_short] NULL
) ON [PRIMARY]
ALTER TABLE [dbo].[usr_profils] ADD
CONSTRAINT [CK__usr_profils_pr_profil_code__string_pk] CHECK ((len(ltrim(rtrim([pr_profil_code])))>(0) AND charindex('*',[pr_profil_code])=(0) AND charindex('%',[pr_profil_code])=(0)))
GO
ALTER TABLE [dbo].[usr_profils] ADD CONSTRAINT [PK_usr_profils] PRIMARY KEY CLUSTERED  ([pr_profil_code]) ON [PRIMARY]
GO
