IF NOT EXISTS (SELECT 1 FROM sys.objects WHERE object_id = OBJECT_ID('[dbo].[mps_prd1]') AND type = 'U')
CREATE TABLE [dbo].[mps_prd1]
(
    [prd_abstract] nvarchar(200) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [prd_area] nvarchar(100) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [prd_attachi] int NULL DEFAULT((0)),
    [prd_barcode] varchar(32) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [prd_bcid] int NULL DEFAULT((0)),
    [prd_branch] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [prd_brand] nvarchar(100) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [prd_click] int NULL DEFAULT((0)),
    [prd_cmpid] int NULL DEFAULT((0)),
    [prd_code] varchar(32) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [prd_createcuid] int NULL DEFAULT((0)),
    [prd_createdepart] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [prd_createdpid] int NULL DEFAULT((0)),
    [prd_createtime] datetime NULL DEFAULT(getdate()),
    [prd_creator] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [prd_cuid] int NULL DEFAULT((0)),
    [prd_cuname] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [prd_depart] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [prd_dpid] int NULL DEFAULT((0)),
    [prd_expireddays] int NULL DEFAULT((0)),
    [prd_factory] nvarchar(100) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [prd_fprdid] bigint NULL DEFAULT((0)),
    [prd_icon] varchar(200) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [prd_icon2] varchar(200) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [prd_id] bigint NOT NULL IDENTITY(1, 1),
    [prd_jclx] nvarchar(100) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [prd_label] nvarchar(200) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [prd_lrbz_bak_bak_20181112102006903] nvarchar(500) COLLATE Chinese_PRC_CI_AS NULL,
    [prd_model] nvarchar(100) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [prd_pack] nvarchar(100) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [prd_pcid] int NULL DEFAULT((0)),
    [prd_price] decimal(18, 4) NULL DEFAULT((0)),
    [prd_productdate] datetime NULL DEFAULT('1900-1-1'),
    [prd_security] int NULL DEFAULT((0)),
    [prd_serialno] int NULL DEFAULT((1)),
    [prd_spec] nvarchar(100) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [prd_tag] int NULL DEFAULT((0)),
    [prd_title] nvarchar(100) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [prd_type] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [prd_unit] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [prd_updated] datetime NULL DEFAULT(getdate()),
    [prd_xmcode] int NULL DEFAULT((0)),
    [prd_caption] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [prd_use] int NULL DEFAULT((0)),
    [prd_xmmc] nvarchar(100) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [prd_lrbz] nvarchar(max) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [prd_lrbz_bak_bak_20181121094543857] nvarchar(2000) COLLATE Chinese_PRC_CI_AS NULL,
    [prd_dsr] nvarchar(100) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [prd_dzc] nvarchar(100) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [prd_qydd] nvarchar(100) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [prd_lrbz_bak] nvarchar(max) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    CONSTRAINT [mps_prd1_pk] PRIMARY KEY ([prd_id] ASC)
)

IF NOT EXISTS (SELECT 1 FROM sys.indexes WHERE object_id = OBJECT_ID('[dbo].[mps_prd1]') AND name = 'mps_prd1_index_1')
CREATE NONCLUSTERED INDEX [mps_prd1_index_1] ON [dbo].[mps_prd1]([prd_cmpid] ASC)

IF NOT EXISTS (SELECT 1 FROM sys.indexes WHERE object_id = OBJECT_ID('[dbo].[mps_prd1]') AND name = 'mps_prd1_index_1')
CREATE NONCLUSTERED INDEX [mps_prd1_index_1] ON [dbo].[mps_prd1]([prd_pcid] ASC)

IF NOT EXISTS (SELECT 1 FROM sys.indexes WHERE object_id = OBJECT_ID('[dbo].[mps_prd1]') AND name = 'mps_prd1_index_1')
CREATE NONCLUSTERED INDEX [mps_prd1_index_1] ON [dbo].[mps_prd1]([prd_code] ASC)

IF NOT EXISTS (SELECT 1 FROM sys.indexes WHERE object_id = OBJECT_ID('[dbo].[mps_prd1]') AND name = 'index_mps_prd1_prd_cmpid')
CREATE NONCLUSTERED INDEX [index_mps_prd1_prd_cmpid] ON [dbo].[mps_prd1]([prd_cmpid] ASC)

IF NOT EXISTS (SELECT 1 FROM sys.indexes WHERE object_id = OBJECT_ID('[dbo].[mps_prd1]') AND name = 'index_mps_prd1_prd_pcid')
CREATE NONCLUSTERED INDEX [index_mps_prd1_prd_pcid] ON [dbo].[mps_prd1]([prd_pcid] ASC)

IF NOT EXISTS (SELECT 1 FROM sys.indexes WHERE object_id = OBJECT_ID('[dbo].[mps_prd1]') AND name = 'index_mps_prd1_prd_code')
CREATE NONCLUSTERED INDEX [index_mps_prd1_prd_code] ON [dbo].[mps_prd1]([prd_code] ASC)