/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\SYS_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_SCH_TASKTRACE', 'T_SCH_TASKTRACE', 'FID', '1';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_SCH_TASKTRACE' AND KSQL_INDNAME = 'IDX_T_SCH_TASKTRACE_TASKID') CREATE INDEX IDX_T_SCH_TASKTRACE_TASKID ON T_SCH_TASKTRACE ( FTASKID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_SCH_TASKTRACE' AND KSQL_INDNAME = 'IDX_T_SCH_TASKTRACE_SCHID') CREATE INDEX IDX_T_SCH_TASKTRACE_SCHID ON T_SCH_TASKTRACE ( FSCHEDULEID );

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_TABNAME = 'T_SCH_TASKTRACE' AND KSQL_INDNAME = 'IDX_T_SCH_TASKTRACE_JOBID') CREATE INDEX IDX_T_SCH_TASKTRACE_JOBID ON T_SCH_TASKTRACE ( FJOBID );



/**End E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest\pdm\SYS_constraint.sql **/
