IF NOT EXISTS (SELECT 1 FROM sys.objects WHERE object_id = OBJECT_ID('[dbo].[mps_customer_users]') AND type = 'U')
CREATE TABLE [dbo].[mps_customer_users]
(
    [ccp_ccid] bigint NOT NULL DEFAULT((0)),
    [ccp_cuid] int NOT NULL DEFAULT((0)),
    [ccp_otid] int NOT NULL DEFAULT((0)),
    [ccp_type] varchar(20) COLLATE Chinese_PRC_CI_AS NOT NULL DEFAULT(''),
    CONSTRAINT [mps_customer_users_pk] PRIMARY KEY ([ccp_ccid] ASC)
    CONSTRAINT [mps_customer_users_pk] PRIMARY KEY ([ccp_cuid] ASC)
    CONSTRAINT [mps_customer_users_pk] PRIMARY KEY ([ccp_type] ASC)
)

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

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

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