EXEC P_ALTERPK 'PK_T_LIC_PROD', 'T_LIC_PROD', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_LIC_PROD_PRODUCTID') CREATE INDEX IDX_T_LIC_PROD_PRODUCTID ON T_LIC_PROD ( FPRODUCTID );


 EXEC P_ALTERPK 'PK_T_LIC_PROD_L', 'T_LIC_PROD_L', 'FPKID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_LIC_PROD_L_FID') CREATE INDEX IDX_T_LIC_PROD_L_FID ON T_LIC_PROD_L ( FID ,FLOCALEID );