zoukankan      html  css  js  c++  java
  • 批量生产改表名的脚本

    SELECT
        CASE
    WHEN TABLE_NAME NOT IN (
        'T_CITY',
        'T_CV_EDUCATION_EXPERIENCE',
        'T_CV_JOB_INTENTION',
        'T_CV_LANGUAGE_ABILITY',
        'T_CV_PRODUCT',
        'T_CV_PROJECT_EXPERIENCE',
        'T_CV_REMARK',
        'T_CV_RESUME_INFO',
        'T_CV_RESUME_REPEAT_HANDLE_RECORD',
        'T_CV_RESUME_UPDATE_HISTORY',
        'T_CV_SEQUENCE',
        'T_CV_TRAINING_EXPERIENCE',
        'T_CV_WORK_EXPERIENCE',
        'T_CV_WORK_TAGS',
        'T_DICTIONARY_MAPPING',
        'T_JOBHUNTER_EDUCATION_EXPERIENCE',
        'T_JOBHUNTER_JOB_INTENTION',
        'T_JOBHUNTER_LANGUAGE_ABILITY',
        'T_JOBHUNTER_PROJECT_EXPERIENCE',
        'T_JOBHUNTER_RESUME_INFO',
        'T_JOBHUNTER_RESUME_PRODUCT',
        'T_JOBHUNTER_TRAINING_EXPERIENCE',
        'T_JOBHUNTER_WORK_EXPERIENCE',
        'T_RESUME',
        'T_RESUME_AUTHORIZED',
        'T_RESUME_BACKGROUND_ATTACHMENT',
        'T_RESUME_BACKGROUND_BUSINESS',
        'T_RESUME_BACKGROUND_FINANCE',
        'T_RESUME_BACKGROUND_OBJECTIVE',
        'T_RESUME_BACKGROUND_RESULT',
        'T_RESUME_BACKGROUND_SKILL',
        'T_RESUME_BACKGROUND_SURVEY',
        'T_RESUME_EDUCATION_BACKGROUND',
        'T_RESUME_EDUCATION_BG_RESPONDENT',
        'T_RESUME_RECOMMEND_CONFORM',
        'T_RESUME_REPORT',
        'T_RESUME_WORK_BACKGROUND',
        'T_RESUME_WORK_BG_RESPONDENT',
        'T_SUPPLIERS_INFO',
        'T_SUPPLIERS_LOCK_HISTORY',
        'T_SUPPLIERS_QIAODA_RESUME_HISTORY',
        'T_SUPPLIERS_RESUME_HISTORY',
        'T_VERSION_CV_EDUCATION_EXPERIENCE',
        'T_VERSION_CV_JOB_INTENTION',
        'T_VERSION_CV_LANGUAGE_ABILITY',
        'T_VERSION_CV_PRODUCT',
        'T_VERSION_CV_PROJECT_EXPERIENCE',
        'T_VERSION_CV_RESUME_INFO',
        'T_VERSION_CV_TRAINING_EXPERIENCE',
        'T_VERSION_CV_WORK_EXPERIENCE',
        'T_VERSION_RESUME_BACKGROUND_SURVEY',
        'T_VERSION_RESUME_EDUCATION_BACKGROUND',
        'T_VERSION_RESUME_REPORT',
        'T_VERSION_RESUME_WORK_BACKGROUND',
        'T_VERSION_RESUME_WORK_BG_RESPONDENT',
        'V_CUSTOM_MENU',
        'view_company'
    ) THEN
        CONCAT(
            'ALTER TABLE ',
            table_name,
            ' RENAME TO SH_',
            table_name,
            ';'
        )
    ELSE
        NULL
    END AS sql_command
    FROM
        information_schema. TABLES
    WHERE
        TABLE_SCHEMA = 'lieni'
  • 相关阅读:
    20000字干货笔记,一天搞定Mysql~【转】
    Linux操作系统概述及内核介绍
    如何在装有高版本NBU的主机上安装低版本的NBU?卸载8.0安装7.5记录
    vmware+kvm+vnc安装配置
    NBU异机恢复Oracle数据库,作业报错2850处理
    NetBackup 进程整理
    1、虚拟化实施流程、宿主机如何选型、如何进行性能测试
    灾难恢复的衡量指标RTO和RPO
    国内主要灾备厂商
    单例设计模式
  • 原文地址:https://www.cnblogs.com/LTmei/p/10532584.html
Copyright © 2011-2022 走看看