 EXEC P_ALTERPK 'PK_T_LIC_GRAYFEATURESCHEME', 'T_LIC_GRAYFEATURESCHEME', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_LIC_GRAYFEATURESCHEME_NUM') CREATE INDEX IDX_LIC_GRAYFEATURESCHEME_NUM ON T_LIC_GRAYFEATURESCHEME ( FNUMBER );


 EXEC P_ALTERPK 'PK_T_LIC_GRAYFEATSCHECLD', 'T_LIC_GRAYFEATSCHECLD', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_T_LIC_GRAYFEATSCHEAPP', 'T_LIC_GRAYFEATSCHEAPP', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_T_LIC_GRAYFEATSCHEOBJ', 'T_LIC_GRAYFEATSCHEOBJ', 'FENTRYID', '1';

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


 EXEC P_ALTERPK 'PK_T_LIC_GRAYFEATURE', 'T_LIC_GRAYFEATURE', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_LIC_GRAYFEATURE_SCHEME') CREATE INDEX IDX_LIC_GRAYFEATURE_SCHEME ON T_LIC_GRAYFEATURE ( FSCHEMEID );