IF NOT EXISTS (SELECT 1 FROM sys.objects WHERE object_id = OBJECT_ID('[dbo].[mps_permission]') AND type = 'U')
CREATE TABLE [dbo].[mps_permission]
(
    [mp_id] int NOT NULL IDENTITY(1, 1),
    [mp_cmpid] int NULL DEFAULT((0)),
    [mp_type] varchar(20) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [mp_ctgid] int NULL DEFAULT((0)),
    [mp_group] int NULL DEFAULT((0)),
    [mp_ppid] int NULL DEFAULT((0)),
    [mp_objid1] int NULL DEFAULT((0)),
    [mp_objid2] int NULL DEFAULT((0)),
    [mp_caption] nvarchar(200) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [mp_sql] nvarchar(2000) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [mp_order] int NULL DEFAULT((0)),
    [mp_updated] int NULL,
    CONSTRAINT [PK_MPS_PERMISSION] PRIMARY KEY ([mp_id] ASC)
)