/**Begin C:\anzhuang\PDM_UPGRADE\PDM1\TCTB_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_TCTB_TAX_MAIN' AND KSQL_COL_NAME ='FBILLSTATUS') 
 ALTER TABLE T_TCTB_TAX_MAIN ADD (FBILLSTATUS VARCHAR(50) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_TCTB_TAX_MAIN' AND KSQL_COL_NAME ='FCREATORID') 
 ALTER TABLE T_TCTB_TAX_MAIN ADD (FCREATORID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_TCTB_TAX_MAIN' AND KSQL_COL_NAME ='FCREATETIME') 
 ALTER TABLE T_TCTB_TAX_MAIN ADD (FCREATETIME DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_TCTB_TAX_MAIN' AND KSQL_COL_NAME ='FMODIFIERID') 
 ALTER TABLE T_TCTB_TAX_MAIN ADD (FMODIFIERID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_TCTB_TAX_MAIN' AND KSQL_COL_NAME ='FMODIFYTIME') 
 ALTER TABLE T_TCTB_TAX_MAIN ADD (FMODIFYTIME DATETIME );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_TCTB_TAX_MAIN' AND KSQL_COL_NAME ='FBILLNO') 
 ALTER TABLE T_TCTB_TAX_MAIN ADD (FBILLNO VARCHAR(100) DEFAULT ' ' NOT NULL );

/**End C:\anzhuang\PDM_UPGRADE\PDM1\TCTB_table.sql **/
