/**Begin D:\DBA2024\差量生成\PDM_UPGRADE\PDM1\SBD_table.sql **/
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BD_MATERIALPURINFO' AND KSQL_COL_NAME ='FMAXBILLQTY') 
 ALTER TABLE T_BD_MATERIALPURINFO ADD (FMAXBILLQTY DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BD_MATERIALPURINFO' AND KSQL_COL_NAME ='FMINBILLQTY') 
 ALTER TABLE T_BD_MATERIALPURINFO ADD (FMINBILLQTY DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BD_MATERIALPURINFO' AND KSQL_COL_NAME ='FBASEUNITID') 
 ALTER TABLE T_BD_MATERIALPURINFO ADD (FBASEUNITID BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BD_MATERIALPURINFO' AND KSQL_COL_NAME ='FMAXBILLBASEQTY') 
 ALTER TABLE T_BD_MATERIALPURINFO ADD (FMAXBILLBASEQTY DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BD_MATERIALPURINFO' AND KSQL_COL_NAME ='FMINBILLBASEQTY') 
 ALTER TABLE T_BD_MATERIALPURINFO ADD (FMINBILLBASEQTY DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BD_MATERIALPURINFO' AND KSQL_COL_NAME ='FPACKINGQTY') 
 ALTER TABLE T_BD_MATERIALPURINFO ADD (FPACKINGQTY DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_BD_MATERIALPURINFO' AND KSQL_COL_NAME ='FPACKINGBASEQTY') 
 ALTER TABLE T_BD_MATERIALPURINFO ADD (FPACKINGBASEQTY DECIMAL(23,10) DEFAULT 0 NOT NULL );

/**End D:\DBA2024\差量生成\PDM_UPGRADE\PDM1\SBD_table.sql **/
