IF NOT EXISTS (SELECT 1 FROM sys.objects WHERE object_id = OBJECT_ID('[dbo].[mps_login_role_fwd]') AND type = 'U')
CREATE TABLE [dbo].[mps_login_role_fwd]
(
    [lgu2_id] int NOT NULL IDENTITY(1, 1),
    [lgu2_lguid] int NULL DEFAULT((0)),
    [lgu2_bizid] int NULL DEFAULT((0)),
    [lgu2_cuid] int NULL DEFAULT((0)),
    [lgu2_cuname] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [lgu2_begin] datetime NULL DEFAULT('1900-1-1'),
    [lgu2_end] datetime NULL DEFAULT('1900-1-1'),
    CONSTRAINT [PK_MPS_LOGIN_ROLE_FWD] PRIMARY KEY ([lgu2_id] ASC)
)

ALTER TABLE [dbo].[mps_login_role_fwd] WITH CHECK ADD CONSTRAINT [FK_MPS_LOGI_REFERENCE_MPS_LOGI43] FOREIGN KEY ([lgu2_lguid]) REFERENCES [dbo].[mps_login_role] ([lgu_id]) ON DELETE CASCADEALTER TABLE [dbo].[mps_login_role_fwd] CHECK CONSTRAINT [FK_MPS_LOGI_REFERENCE_MPS_LOGI43]