IF NOT EXISTS (SELECT 1 FROM sys.objects WHERE object_id = OBJECT_ID('[dbo].[mps_biztype_comefrom_fieldmap]') AND type = 'U')
CREATE TABLE [dbo].[mps_biztype_comefrom_fieldmap]
(
    [bsf_id] int NOT NULL IDENTITY(1, 1),
    [bsf_bsid] int NULL DEFAULT((0)),
    [bsf_tfldname] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [bsf_expression] nvarchar(1000) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [bsf_method] int NULL DEFAULT((0)),
    [bsf_datatype] varchar(20) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [bsf_use] int NULL DEFAULT((0)),
    CONSTRAINT [PK_MPS_BIZTYPE_COMEFROM_FIELDM] PRIMARY KEY ([bsf_id] ASC)
)

ALTER TABLE [dbo].[mps_biztype_comefrom_fieldmap] WITH CHECK ADD CONSTRAINT [FK_MPS_BIZT_REFERENCE_MPS_BIZT_MAP] FOREIGN KEY ([bsf_bsid]) REFERENCES [dbo].[mps_biztype_comefrom] ([bs_id]) ON DELETE CASCADEALTER TABLE [dbo].[mps_biztype_comefrom_fieldmap] CHECK CONSTRAINT [FK_MPS_BIZT_REFERENCE_MPS_BIZT_MAP]