zoukankan      html  css  js  c++  java
  • 更改某个用户下所有的表中的某个字段替换关键字(未优化比较慢)

    create or replace procedure updateAll is
    ----替换所有的表,并且表中所有的字段
    tmp_table user_tables.TABLE_NAME%type;
    begin
    for rec in (select table_name from user_tables) loop
    select table_name into tmp_table from user_tables where table_name =rec.table_name;
    for r in (select column_name from user_tab_cols where table_name=tmp_table) loop

    execute immediate 'update '
    ||
    tmp_table
    ||
    ' set '
    ||
    r.column_name
    ||
    '= replace( '
    ||
    r.column_name
    ||
    ',''开封'',''北京'') where '
    ||
    r.column_name
    ||
    ' like ''%开封%'' ';
    commit;
    --- update ACT_GE_BYTEARRAY set rev_ =replace(id_,'开封','西安') where rev_ like '%开封%'

    end loop;
    end loop;
    end updateAll;

  • 相关阅读:
    DRF 版本和认证
    DRF 视图和路由
    DRF 序列化组件
    RESTful
    Vuex以及axios
    npm、webpack、vue-cli
    Vue 生命周期
    Vue Router
    Vue 组件
    Vue 快速入门
  • 原文地址:https://www.cnblogs.com/auldlangsynezh/p/8032746.html
Copyright © 2011-2022 走看看