ORACLE表名與列名小寫轉成大寫

批量將表名變爲大寫
begin
for c in (select table_name tn from user_tables where table_name <> upper(table_name)) loop
begin
execute immediate 'alter table "'||c.tn||'" rename to '||c.tn;
exception
when others then
dbms_output.put_line(c.tn||'已存在');
end;
end loop;
end;
做者:yeiqing000
連接:http://www.imooc.com/article/14076
來源:慕課網
相關文章
相關標籤/搜索