/**Begin E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest(平台_业务)\pdm\TPO_constraint.sql **/
 EXEC P_ALTERPK 'PK_T_TPO_TCVAT_CODE_TREE_L', 'T_TPO_TCVAT_CODE_TREE_L', 'FPKID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_TPO_TCVAT_CODE_TREE_L') CREATE  CLUSTERED INDEX IDX_T_TPO_TCVAT_CODE_TREE_L ON T_TPO_TCVAT_CODE_TREE_L ( FID );


 EXEC P_ALTERPK 'PK_T_TPO_TCVAT_DATATYPE', 'T_TPO_TCVAT_DATATYPE', 'FID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_TPO_TCVAT_DATATYPE') CREATE  CLUSTERED INDEX IDX_T_TPO_TCVAT_DATATYPE ON T_TPO_TCVAT_DATATYPE ( FNUMBER );


 EXEC P_ALTERPK 'PK_T_TPO_TCVAT_DATATYPE_L', 'T_TPO_TCVAT_DATATYPE_L', 'FPKID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_TPO_TCVAT_DATATYPE_L_FID') CREATE  CLUSTERED INDEX IDX_T_TPO_TCVAT_DATATYPE_L_FID ON T_TPO_TCVAT_DATATYPE_L ( FID );


 EXEC P_ALTERPK 'PK_T_TPO_TCVAT_CODE_TREE', 'T_TPO_TCVAT_CODE_TREE', 'FID', '0';

 IF NOT EXISTS (SELECT 1 FROM KSQL_INDEXES WHERE KSQL_INDNAME = 'IDX_T_TPO_TCVAT_CODE_TREE_NUM') CREATE  CLUSTERED INDEX IDX_T_TPO_TCVAT_CODE_TREE_NUM ON T_TPO_TCVAT_CODE_TREE ( FNUMBER );



/**End E:\NextERP_PDM\PDM_UPGRADE\PDMS\branch_lastest(平台_业务)\pdm\TPO_constraint.sql **/
