/* 给T_EB_RULE_INSTANCE_DETAIL表加FID字段 */
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_EB_RULE_INSTANCE_DETAIL' AND KSQL_COL_NAME IN ('FID')) 
 ALTER TABLE T_EB_RULE_INSTANCE_DETAIL ADD (FID BIGINT DEFAULT 0 NOT NULL);
/* 设置T_EB_RULE_INSTANCE表的FID字段为主键 */
EXEC P_ALTERPK 'PK_T_EB_RULE_INSTANCE', 'T_EB_RULE_INSTANCE', 'FID', '1';
/* 设置PK_T_EB_RULE_INSTANCE_DETAIL表的FID字段为主键 */
EXEC P_ALTERPK 'PK_T_EB_RULE_INSTANCE_DETAIL', 'T_EB_RULE_INSTANCE_DETAIL', 'FID', '1';