IF NOT EXISTS (SELECT 1 FROM sys.objects WHERE object_id = OBJECT_ID('[dbo].[mps_prdctg]') AND type = 'U')
CREATE TABLE [dbo].[mps_prdctg]
(
    [pc_id] int NOT NULL IDENTITY(1, 1),
    [pc_cmpid] int NULL DEFAULT((0)),
    [pc_tag] int NULL DEFAULT((0)),
    [pc_caption] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [pc_type] nvarchar(100) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [pc_father] int NULL DEFAULT((0)),
    [pc_full] nvarchar(500) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [pc_keys] nvarchar(4000) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [pc_code] varchar(50) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [pc_level] int NULL DEFAULT((0)),
    [pc_order] int NULL DEFAULT((999)),
    [pc_share] int NULL DEFAULT((1)),
    [pc_querytime] int NULL DEFAULT((0)),
    [pc_groupfields] nvarchar(200) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [pc_status] int NULL DEFAULT((1)),
    [pc_security] int NULL DEFAULT((0)),
    [pc_changed] int NULL,
    [pc_icon] varchar(200) COLLATE Chinese_PRC_CI_AS NULL,
    [pc_database] varchar(50) COLLATE Chinese_PRC_CI_AS NULL,
    [pc_bmcode] varchar(200) COLLATE Chinese_PRC_CI_AS NULL,
    [pc_searchfields] varchar(2000) COLLATE Chinese_PRC_CI_AS NULL,
    [pc_selectfuncs] nvarchar(500) COLLATE Chinese_PRC_CI_AS NULL,
    [pc_selectstyle] int NULL,
    [pc_funcs] varchar(200) COLLATE Chinese_PRC_CI_AS NULL,
    [pc_flows] nvarchar(2000) COLLATE Chinese_PRC_CI_AS NULL,
    [pc_params] varchar(500) COLLATE Chinese_PRC_CI_AS NULL,
    [pc_viewscope] int NULL,
    [pc_views] int NULL,
    [pc_select] nvarchar(4000) COLLATE Chinese_PRC_CI_AS NULL,
    [pc_from] nvarchar(2000) COLLATE Chinese_PRC_CI_AS NULL,
    [pc_where] nvarchar(4000) COLLATE Chinese_PRC_CI_AS NULL,
    [pc_orderby] nvarchar(2000) COLLATE Chinese_PRC_CI_AS NULL,
    [pc_taggroupfields] nvarchar(200) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [pc_tagquerytime] int NULL DEFAULT((0)),
    [pc_tagsearchfields] varchar(2000) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [pc_tagselectstyle] int NULL DEFAULT((0)),
    [pc_tagselect] nvarchar(4000) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [pc_tagfrom] nvarchar(2000) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [pc_tagwhere] nvarchar(4000) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [pc_tagorderby] nvarchar(2000) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [pc_ffpcid] int NOT NULL DEFAULT((0)),
    [pc_fullcode] varchar(1000) COLLATE Chinese_PRC_CI_AS NOT NULL DEFAULT(''),
    CONSTRAINT [PK_MPS_PRDCTG] PRIMARY KEY ([pc_id] ASC)
)