---非时序
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HPDI_PAYROLLACTG' AND KSQL_COL_NAME ='FBOID')
 ALTER TABLE T_HPDI_PAYROLLACTG ADD (FBOID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HPDI_PAYROLLACTG' AND KSQL_COL_NAME ='FISCURRENTVERSION')
 ALTER TABLE T_HPDI_PAYROLLACTG ADD (FISCURRENTVERSION CHAR(1) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HPDI_PAYROLLACTG' AND KSQL_COL_NAME ='FDATASTATUS')
 ALTER TABLE T_HPDI_PAYROLLACTG ADD (FDATASTATUS VARCHAR(10) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HPDI_PAYROLLACTG' AND KSQL_COL_NAME ='FSOURCEVID')
 ALTER TABLE T_HPDI_PAYROLLACTG ADD (FSOURCEVID BIGINT DEFAULT 0 NOT NULL );


IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HPDI_PAYROLLACTG' AND KSQL_COL_NAME ='FHISVERSION')
 ALTER TABLE T_HPDI_PAYROLLACTG ADD (FHISVERSION VARCHAR(10) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HPDI_PAYROLLACTG' AND KSQL_COL_NAME ='FCHANGEDESCRIPTION')
 ALTER TABLE T_HPDI_PAYROLLACTG ADD (FCHANGEDESCRIPTION VARCHAR(255) DEFAULT ' ' NOT NULL );


----分录
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_HPDI_PAYROLLACTGENT' AND KSQL_COL_NAME ='FENTRYBOID')
 ALTER TABLE T_HPDI_PAYROLLACTGENT ADD (FENTRYBOID BIGINT DEFAULT 0 NOT NULL );



