
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_IM_MDC_MQBENTRY' AND KSQL_COL_NAME ='FOPRNO') 
 ALTER TABLE T_IM_MDC_MQBENTRY ADD (FOPRNO NVARCHAR(50) DEFAULT ' ' NOT NULL );
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_IM_MDC_MQBENTRY' AND KSQL_COL_NAME ='FOPRWORKCENTER') 
 ALTER TABLE T_IM_MDC_MQBENTRY ADD (FOPRWORKCENTER BIGINT DEFAULT 0 NOT NULL );
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_IM_MDC_MQBENTRY' AND KSQL_COL_NAME ='FWORKSTATION') 
 ALTER TABLE T_IM_MDC_MQBENTRY ADD (FWORKSTATION BIGINT DEFAULT 0 NOT NULL );
 
  IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_IM_MDC_MQBENTRY' AND KSQL_COL_NAME ='FRETURNMATERIALTYPE') 
 ALTER TABLE T_IM_MDC_MQBENTRY ADD (FRETURNMATERIALTYPE CHAR(1) DEFAULT 'A' NOT NULL );
 