--编号
declare v_cnt number;
V_SQL VARCHAR2 (500) := '';
begin
select count(*) into v_cnt from dual where exists(SELECT * FROM USER_TAB_COLUMNS WHERE TABLE_NAME = UPPER('TB_FDN_DEVICEPROJECTHOUSE') AND COLUMN_NAME = 'INFOBH');
if v_cnt = 0 then
V_SQL := 'ALTER TABLE TB_FDN_DEVICEPROJECTHOUSE ADD INFOBH VARCHAR2(20)';
EXECUTE IMMEDIATE V_SQL;
V_SQL := 'comment on column TB_FDN_DEVICEPROJECTHOUSE.INFOBH is ''编号''';
EXECUTE IMMEDIATE V_SQL;
end if;
end;