IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_BD_EXPITEMRELCENTER')
CREATE TABLE T_BD_EXPITEMRELCENTER (
                                       FID BIGINT DEFAULT 0 NOT NULL,
                                       FNUMBER VARCHAR(60) DEFAULT ' ' NOT NULL,
                                       FSTATUS CHAR(1) DEFAULT ' ' NOT NULL,
                                       FCREATORID BIGINT DEFAULT 0 NOT NULL,
                                       FMODIFIERID BIGINT DEFAULT 0 NOT NULL,
                                       FENABLE CHAR(1) DEFAULT ' ' NOT NULL,
                                       FCREATETIME DATETIME,
                                       FMODIFYTIME DATETIME,
                                       FMASTERID BIGINT DEFAULT 0 NOT NULL,
                                       FDISABLERID BIGINT DEFAULT 0 NOT NULL,
                                       FDISABLEDATE DATETIME,
                                       fexpitemid BIGINT DEFAULT 0 NOT NULL,
                                       frelcenterid BIGINT DEFAULT 0 NOT NULL
);
EXEC P_ALTERPK 'PK_T_BD_EXPITEMRELCENTER', 'T_BD_EXPITEMRELCENTER', 'FID', '1';
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BD_EXPITEMRELCENTER_FEXPITEMID') CREATE INDEX IDX_BD_EXPITEMRELCENTER_FEXPITEMID ON T_BD_EXPITEMRELCENTER ( fexpitemid );
 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BD_EXPITEMRELCENTER_FRELCENTERID') CREATE INDEX IDX_BD_EXPITEMRELCENTER_FRELCENTERID ON T_BD_EXPITEMRELCENTER ( frelcenterid );


