 EXEC P_ALTERPK 'PK_T_PERM_ROLEDATARULE', 'T_PERM_ROLEDATARULE', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PERM_ROLEDR') CREATE INDEX IDX_PERM_ROLEDR ON T_PERM_ROLEDATARULE ( FROLEID ,FAPPID ,FENTITYNUM ,FPERMITEMID );


 EXEC P_ALTERPK 'PK_T_PERM_ROLEDATARULE_PROP', 'T_PERM_ROLEDATARULE_PROP', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_PERM_ROLEDR_P') CREATE INDEX IDX_PERM_ROLEDR_P ON T_PERM_ROLEDATARULE_PROP ( FROLEID ,FAPPID ,FENTITYNUM ,FPROPKEY );
