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

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