CREATE TABLE [dbo].[nm_risks_movements]
(
[rmvt_movement_code] [dbo].[ais_code_short] NOT NULL,
[rmvt_rowver] [timestamp] NOT NULL,
[rmvt_l1] [nvarchar] (64) COLLATE French_CI_AS NOT NULL,
[rmvt_l2] [nvarchar] (64) COLLATE French_CI_AS NULL,
[rmvt_l3] [nvarchar] (64) COLLATE French_CI_AS NULL,
[rmvt_type_edit] [bit] NOT NULL CONSTRAINT [DF__nm_risks_movements__rmvt_type_edit] DEFAULT ((0)),
[rmvt_type_add] [bit] NOT NULL CONSTRAINT [DF__nm_risks_movements__rmvt_type_add] DEFAULT ((0)),
[rmvt_type_retire] [bit] NOT NULL CONSTRAINT [DF__nm_risks_movements__rmvt_type_retire] DEFAULT ((0)),
[rmvt_sys] [bit] NOT NULL CONSTRAINT [DF__nm_risks_movements__rmvt_sys] DEFAULT ((0))
) ON [PRIMARY]
ALTER TABLE [dbo].[nm_risks_movements] ADD
CONSTRAINT [CK__nm_risks_movements_rmvt_movement_code__string_pk] CHECK ((len(ltrim(rtrim([rmvt_movement_code])))>(0) AND charindex('*',[rmvt_movement_code])=(0) AND charindex('%',[rmvt_movement_code])=(0)))




GO
ALTER TABLE [dbo].[nm_risks_movements] ADD CONSTRAINT [PK_nm_risks_movements] PRIMARY KEY CLUSTERED  ([rmvt_movement_code]) ON [PRIMARY]
GO
