IF NOT EXISTS (SELECT 1 FROM sys.objects WHERE object_id = OBJECT_ID('[dbo].[pub_power]') AND type = 'U')
CREATE TABLE [dbo].[pub_power]
(
    [pw_id] int NOT NULL IDENTITY(1, 1),
    [pd_id] int NULL DEFAULT((0)),
    [pd_dbserver] varchar(10) COLLATE Chinese_PRC_CI_AS NULL DEFAULT('MSSQL'),
    [pw_type] varchar(10) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [pw_category] nvarchar(100) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [pw_title] nvarchar(100) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    CONSTRAINT [PK_PUB_POWER] PRIMARY KEY ([pw_id] ASC)
)

ALTER TABLE [dbo].[pub_power] WITH CHECK ADD CONSTRAINT [FK_PUB_POWE_REFERENCE_PUB_POWE] FOREIGN KEY ([pd_id]) REFERENCES [dbo].[pub_power_define] ([pd_id]) ON DELETE CASCADE
ALTER TABLE [dbo].[pub_power] CHECK CONSTRAINT [FK_PUB_POWE_REFERENCE_PUB_POWE]
ALTER TABLE [dbo].[pub_power] WITH CHECK ADD CONSTRAINT [FK_PUB_POWE_REFERENCE_PUB_POWE] FOREIGN KEY ([pd_dbserver]) REFERENCES [dbo].[pub_power_define] ([pd_dbserver]) ON DELETE CASCADE
ALTER TABLE [dbo].[pub_power] CHECK CONSTRAINT [FK_PUB_POWE_REFERENCE_PUB_POWE]