
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MDS_PRODUCTFAMILY' AND KSQL_COL_NAME ='FMATERIALPLAN')
 ALTER TABLE T_MDS_PRODUCTFAMILY ADD (FMATERIALPLAN BIGINT DEFAULT 0 NOT NULL );

