IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_RECBILLCHANG_E' AND KSQL_COL_NAME IN ('FREFUNDTYPE'))
ALTER TABLE T_CAS_RECBILLCHANG_E ADD (FREFUNDTYPE NVARCHAR(30) DEFAULT ' ' NOT NULL );

IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_CAS_REFUND_OPLOG' AND KSQL_COL_NAME IN ('FTRACE'))
ALTER TABLE T_CAS_REFUND_OPLOG ADD (FTRACE NVARCHAR(128) DEFAULT ' ' NOT NULL );

EXEC p_AlterColumn 'T_CAS_REFUND_OPLOG', 'FTRACEID', 'NULL', 'NULL', '1001', 'NULL';