IF NOT EXISTS (SELECT 1 FROM sys.objects WHERE object_id = OBJECT_ID('[dbo].[mps_docctg]') AND type = 'U')
CREATE TABLE [dbo].[mps_docctg]
(
    [dc_id] int NOT NULL IDENTITY(1, 1),
    [dc_cmpid] int NULL DEFAULT((0)),
    [dc_tag] int NULL DEFAULT((0)),
    [dc_caption] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [dc_type] nvarchar(100) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [dc_father] int NULL DEFAULT((0)),
    [dc_full] nvarchar(500) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [dc_keys] nvarchar(4000) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [dc_code] varchar(50) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [dc_level] int NULL DEFAULT((0)),
    [dc_order] int NULL DEFAULT((999)),
    [dc_share] int NULL DEFAULT((1)),
    [dc_status] int NULL DEFAULT((1)),
    [dc_security] int NULL DEFAULT((0)),
    [dc_frombiz] int NULL DEFAULT((1)),
    [dc_powerlevel] int NULL,
    [dc_querytime] int NULL,
    [dc_defaultquery] int NULL,
    [dc_changed] int NULL,
    [dc_viewscope] int NULL DEFAULT((0)),
    [dc_views] int NULL DEFAULT((0)),
    CONSTRAINT [PK_MPS_DOCCTG] PRIMARY KEY ([dc_id] ASC)
)