 EXEC P_ALTERPK 'PK_T_BOTP_LINKDELETED_RECORD', 'T_BOTP_LINKDELETED_RECORD', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_BOTP_LINKDELETED_RECORD' AND KSQL_INDNAME = 'IDX_BOTP_LINKDELETED_RECORD') CREATE INDEX IDX_BOTP_LINKDELETED_RECORD ON T_BOTP_LINKDELETED_RECORD ( FTARGETNUMBER ,FTARGETFID ,FSOURCENUMBER ,FSOURCEFID );
