/** 建立最大号表索引: 粒度为规则+依据 **/
IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_CR_MaxSerial_CRIDSortItem') CREATE INDEX IDX_CR_MaxSerial_CRIDSortItem ON T_CR_MAXSERIAL ( FCodeRuleID ,FSortItemValue );

/** 删除最大号表索引: 粒度为规则 **/
EXEC p_DropIdx 'IDX_T_CR_MAXSERIAL_FCRID', 'T_CR_MAXSERIAL';