EXEC P_ALTERPK 'PK_T_BD_MATERIALATTRSYNCLOG', 'T_BD_MATERIALATTRSYNCLOG', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_BD_MATERIALATTRSYNCLOG') CREATE INDEX IDX_BD_MATERIALATTRSYNCLOG ON T_BD_MATERIALATTRSYNCLOG ( FMATERIALNAME ,FMATERIALNUMBER );