IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_DROPPLANORDERLOG' AND KSQL_COL_NAME ='FBILLTYPE') 
 ALTER TABLE T_MRP_DROPPLANORDERLOG ADD (FBILLTYPE BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_DROPPLANORDERLOG' AND KSQL_COL_NAME ='FPLANOPERATENUM') 
 ALTER TABLE T_MRP_DROPPLANORDERLOG ADD (FPLANOPERATENUM NVARCHAR(100) DEFAULT ' ' NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_DROPPLANORDERLOG' AND KSQL_COL_NAME ='FBILLSTATUS') 
 ALTER TABLE T_MRP_DROPPLANORDERLOG ADD (FBILLSTATUS NVARCHAR(30) DEFAULT ' ' NOT NULL );
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_DROPPLANORDERLOG' AND KSQL_COL_NAME ='FORGID') 
 ALTER TABLE T_MRP_DROPPLANORDERLOG ADD (FORGID BIGINT DEFAULT 0 NOT NULL );
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_DROPPLANORDERLOG' AND KSQL_COL_NAME ='FPROORPURORG') 
 ALTER TABLE T_MRP_DROPPLANORDERLOG ADD (FPROORPURORG BIGINT DEFAULT 0 NOT NULL );
  IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_DROPPLANORDERLOG' AND KSQL_COL_NAME ='FMATERIAL') 
 ALTER TABLE T_MRP_DROPPLANORDERLOG ADD (FMATERIAL BIGINT DEFAULT 0 NOT NULL );
  IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_DROPPLANORDERLOG' AND KSQL_COL_NAME ='FPLANSCOPE') 
 ALTER TABLE T_MRP_DROPPLANORDERLOG ADD (FPLANSCOPE BIGINT DEFAULT 0 NOT NULL );
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_DROPPLANORDERLOG' AND KSQL_COL_NAME ='FORDERQTY') 
 ALTER TABLE T_MRP_DROPPLANORDERLOG ADD (FORDERQTY DECIMAL(23,10) DEFAULT 0 NOT NULL);
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_DROPPLANORDERLOG' AND KSQL_COL_NAME ='FUNIT') 
 ALTER TABLE T_MRP_DROPPLANORDERLOG ADD (FUNIT BIGINT DEFAULT 0 NOT NULL );
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_DROPPLANORDERLOG' AND KSQL_COL_NAME ='FSUPPLIER') 
 ALTER TABLE T_MRP_DROPPLANORDERLOG ADD (FSUPPLIER BIGINT DEFAULT 0 NOT NULL );
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_DROPPLANORDERLOG' AND KSQL_COL_NAME ='FCONFIGUREDCODE') 
 ALTER TABLE T_MRP_DROPPLANORDERLOG ADD (FCONFIGUREDCODE BIGINT DEFAULT 0 NOT NULL );
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_DROPPLANORDERLOG' AND KSQL_COL_NAME ='FORDERTYPE') 
 ALTER TABLE T_MRP_DROPPLANORDERLOG ADD (FORDERTYPE NVARCHAR(50) DEFAULT ' ' NOT NULL );
