当前位置:Gxlcms > 数据库问题 > oracle可重复执行脚本(添加字段)

oracle可重复执行脚本(添加字段)

时间:2021-07-01 10:21:17 帮助过:30人阅读

  cn integer;

begin

  cn := 0;

  select count(*) 

  into cn

  from user_tab_cols t 

  where t.table_name=‘T_BANK_BOND_MARKET_SET

  and t.column_name =‘B_LEVEL_ISSUE‘;

  if cn =0 then

  execute immediate ALTER TABLE T_BANK_BOND_MARKET_SET ADD (B_LEVEL_ISSUE VARCHAR2(10))‘;

  end if;

end;

/

oracle可重复执行脚本(添加字段)

标签:count   oracle   style   issue   cut   重复   The   iss   user   

人气教程排行