
/**账单池 干系人 **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERTABLES WHERE KSQL_TABNAME = 'T_ER_BILLINGPOOLOWER')
 CREATE TABLE T_ER_BILLINGPOOLOWER (
FPKID BIGINT DEFAULT 0 NOT NULL,
FID BIGINT DEFAULT 0 NOT NULL,
FBASEDATAID BIGINT DEFAULT 0 NOT NULL
);

/**账单池 干系人 **/
 EXEC P_ALTERPK 'PK_ER_BILLINGPOOLOWER', 'T_ER_BILLINGPOOLOWER', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_ER_BILLINGPOOLOWER') CREATE INDEX IDX_ER_BILLINGPOOLOWER ON T_ER_BILLINGPOOLOWER ( FID );