oracle中将表字段修改为大写

begin
for c in (select COLUMN_NAME cn from all_tab_columns where table_name='表名') loop
begin
execute immediate 'alter table 表名 rename column "'||c.cn||'" to '||c.cn;
exception
when others then
dbms_output.put_line('表名'||'.'||c.cn||'已经存在');
end;
end loop;
end;

表名替换为需要更改字段大小写的表名值。

猜你喜欢

转载自blog.csdn.net/ChenLeihappy/article/details/80758363