IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_STAKEHOLDERDETAIL' AND KSQL_COL_NAME ='FAPPLIERBEFORE')
ALTER TABLE T_ER_STAKEHOLDERDETAIL ADD (FAPPLIERBEFORE VARCHAR(200) DEFAULT ' ' NOT NULL);
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_STAKEHOLDERDETAIL' AND KSQL_COL_NAME ='FAPPLIERAFTER')
ALTER TABLE T_ER_STAKEHOLDERDETAIL ADD (FAPPLIERAFTER BIGINT DEFAULT 0 NOT NULL);
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_ER_STAKEHOLDERDETAIL' AND KSQL_COL_NAME ='FSRCDEPTID')
ALTER TABLE T_ER_STAKEHOLDERDETAIL ADD (FSRCDEPTID VARCHAR(50)  DEFAULT ' ' NOT NULL);

EXEC p_AlterColumn 'T_ER_STAKEHOLDERBILL_L', 'FPKID', 'VARCHAR(36)', 'NOT NULL', '1111', ''' ''';