DECLARE
    v_count NUMBER;
BEGIN
    SELECT COUNT(1)
      INTO v_count
      FROM USER_TAB_COLUMNS
     WHERE TABLE_NAME = 'SEAL_CONTRACT_LAUNCH_MAIN'
       AND COLUMN_NAME = 'NEED_AMENDMENTS';
    IF v_count = 0 THEN
        EXECUTE IMMEDIATE 'ALTER TABLE SEAL_CONTRACT_LAUNCH_MAIN ADD NEED_AMENDMENTS VARCHAR2(4 CHAR) DEFAULT ''0''';
        EXECUTE IMMEDIATE 'COMMENT ON COLUMN SEAL_CONTRACT_LAUNCH_MAIN.NEED_AMENDMENTS IS ''是否需修订条款：1是 0否''';
    END IF;

    SELECT COUNT(1)
      INTO v_count
      FROM USER_TAB_COLUMNS
     WHERE TABLE_NAME = 'SEAL_CONTRACT_LAUNCH_MAIN'
       AND COLUMN_NAME = 'ESTIMATED_AMOUNT';
    IF v_count = 0 THEN
        EXECUTE IMMEDIATE 'ALTER TABLE SEAL_CONTRACT_LAUNCH_MAIN ADD ESTIMATED_AMOUNT NUMBER(20, 2)';
        EXECUTE IMMEDIATE 'COMMENT ON COLUMN SEAL_CONTRACT_LAUNCH_MAIN.ESTIMATED_AMOUNT IS ''预估金额''';
    END IF;
END;
/
