增加字段oracle


declare cnt number;
begin
---查询要创建的表是否存在
select count(1)
into cnt
from cols
where table_name = upper('APPR_EXCHANGE_INST')
and column_name = upper('feedback_status');

---如果存在则删除该表
if cnt<1 then
execute immediate 'ALTER TABLE APPR_EXCHANGE_INST ADD feedback_status varchar2(1) NULL';
end if;
end;
/
commit;

posted @ 2015-11-29 22:35  zshblog  阅读(197)  评论(0编辑  收藏  举报