zoukankan      html  css  js  c++  java
  • oracle 批量修改表名 字段为大写197

    修改那个表空间必须用那个表空间的用户登录

    -- 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;

    -- oracle 批量修改列名为大写(当前登录用户
    begin
    for cl in (SELECT table_name,column_name from user_tab_columns WHERE column_name<>upper(column_name) and upper(column_name) not in('SIZE','CHECK')) loop
    begin
    execute immediate 'alter table '||cl.table_name||' rename column "'|| cl.column_name ||'" to '||upper(cl.column_name);
    exception
    when others then
    dbms_output.put_line(cl.table_name||'.'||cl.column_name||'已存在');
    end;
    end loop;
    end;

  • 相关阅读:
    POJ-1182 食物链
    hdu 1879 继续畅通工程
    HDU 2604 Queuing
    hdu 1232 畅通工程
    POJ-1611 The Suspects
    Free DIY Tour
    Tr A
    不容易系列之(3)―― LELE的RPG难题
    W3C标准冒泡、捕获机制
    JavaScript 浏览器事件解读
  • 原文地址:https://www.cnblogs.com/Ai-Hen-Jiao-zhi/p/13030848.html
Copyright © 2011-2022 走看看