IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MSPLAN_KEYMATERIAL' AND KSQL_COL_NAME ='FPRODUCTTYPE') 
 ALTER TABLE T_MSPLAN_KEYMATERIAL ADD (FPRODUCTTYPE NVARCHAR(50) DEFAULT ' ' NOT NULL);
 
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MSPLAN_KEYMATERIAL' AND KSQL_COL_NAME ='FMATERIEL') 
 ALTER TABLE T_MSPLAN_KEYMATERIAL ADD (FMATERIEL BIGINT DEFAULT 0 NOT NULL);
 
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MSPLAN_KEYMATERIAL' AND KSQL_COL_NAME ='FUNIT') 
 ALTER TABLE T_MSPLAN_KEYMATERIAL ADD (FUNIT BIGINT DEFAULT 0 NOT NULL);
 
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MSPLAN_KEYMATERIAL' AND KSQL_COL_NAME ='FMATERIALGROUP') 
 ALTER TABLE T_MSPLAN_KEYMATERIAL ADD (FMATERIALGROUP BIGINT DEFAULT 0 NOT NULL);
