在oracle中使用Alter语句



我有一个表,其中有一列包含这些数据

虚拟列th>

类似这样的操作应该可以工作,显然假设在该虚拟列中存储了真正的DDL语句。

  • forloop在列上,当值不为空
  • execute immediate代替;

例子

declare
vsql table.dummy_column%type;
begin
for h in ( select dummy_column from table where dummy_column is not null )
loop
vsql := replace(h.dummy_column,';','');
execute immediate vsql;
end loop;
end;
/

最新更新