
-- 是否完全核销字段
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 't_im_mdc_ominbillentry_r' AND KSQL_COL_NAME ='fcompletewriteoff') 
 ALTER TABLE t_im_mdc_ominbillentry_r ADD (fcompletewriteoff CHAR(1) DEFAULT '0' NOT NULL);