--额度映射部门-多选费用项目表
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_ER_REIMCTL_EXPENSEITEMS')
CREATE TABLE T_ER_REIMCTL_EXPENSEITEMS (
    FPKID BIGINT DEFAULT 0 NOT NULL,
    FID BIGINT DEFAULT 0 NOT NULL,
    FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);

EXEC P_ALTERPK 'PK_T_ER_REIMCTL_EXPENSEITEMS', 'T_ER_REIMCTL_EXPENSEITEMS', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_ER_REIMCTL_EXPENSEITEMS_ID') CREATE INDEX IDX_ER_REIMCTL_EXPENSEITEMS_ID ON T_ER_REIMCTL_EXPENSEITEMS ( FID ,FBASEDATAID );
