/**Begin D:\PDM_UPGRADE\PDM1\FCS_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FCS_TASKEXEDETAIL_LOG' AND KSQL_COL_NAME IN ('FMAINENTITYID')) 
 ALTER TABLE T_FCS_TASKEXEDETAIL_LOG ADD (FMAINENTITYID NVARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_FCS_TASKEXEDETAIL_LOG' AND KSQL_COL_NAME IN ('FBIZBILLNO')) 
 ALTER TABLE T_FCS_TASKEXEDETAIL_LOG ADD (FBIZBILLNO NVARCHAR(50) DEFAULT ' ' NOT NULL );
 --- drop column --------- 请认真检查该脚本 ------------------- 
 EXEC p_AlterColumn 'T_FCS_TASKEXEDETAIL_LOG', 'FBIZENTITYID', 'NULL', 'NULL', '1001', 'NULL';


/**End D:\PDM_UPGRADE\PDM1\FCS_table.sql **/
