当前位置:网站首页>将某数据库N多表名作为另外一张表中某一列得值(范围可以是别的数据库中得某张表)
将某数据库N多表名作为另外一张表中某一列得值(范围可以是别的数据库中得某张表)
2022-06-27 23:47:00 【OUO~】
需求场景

先查查能否匹配上
select * from ouo o
INNER JOIN information_schema.TABLES t on INSTR(t.table_name,o.key)
where table_schema='wewe'

发现能匹配上,下一步就可以批量修改了
update ouo o INNER JOIN information_schema.TABLES t on INSTR(t.table_name,o.key)
set o.username=t.table_name
where table_schema='wewe'
结果如下图

主要是MYSQL INSTR函数得作用,可以搜搜MYSQL 字符串包含尝试更多种写法
边栏推荐
- 基于AM335X开发板 ARM Cortex-A8——Acontis EtherCAT主站开发案例
- Centos8 operation record command version Yum redis MySQL Nacos JDK
- 什麼是數字化?什麼是數字化轉型?為什麼企業選擇數字化轉型?
- 力扣今日题-522. 最长特殊序列
- Is there any risk in opening an account for flush stock? Is it safe for flush to open an account
- Adobe Premiere基础-常用的视频特效(裁剪,黑白,剪辑速度,镜像,镜头光晕)(十五)
- Web3 technology initial experience and related learning materials
- Intensive reading of transformer thesis paragraph by paragraph
- Some problems in awk
- Scala 基础 (三):运算符和流程控制
猜你喜欢

MySQL - function

What are the requirements for customizing the slip ring for UAV

Esxi based black Qunhui DSM 7.0.1 installation of VMware Tools

DeepMind | 通过去噪来进行分子性质预测的预训练

Web3 技术初体验以及相关学习资料

嵌入式必学,硬件资源接口详解——基于ARM AM335X开发板 (上)

Database query optimization: master-slave read-write separation and common problems

Solon 1.8.3 发布,云原生微服务开发框架

How to optimize the "message" list of IM

Adobe Premiere Basics - common video effects (cropping, black and white, clip speed, mirroring, lens halo) (XV)
随机推荐
同花顺上能炒股开户吗?安全吗?
Data analysts too hot? Monthly income 3W? Tell you the true situation of this industry with data
1382. 将二叉搜索树变平衡-常规方法
[Yocto RM]9 - QA Error and Warning Messages
万字长文看懂商业智能(BI)|推荐收藏
[embedded foundation] memory (cache, ram, ROM, flash)
完全二叉树的节点个数[非O(n)求法 -> 抽象二分]
LMSOC:一种对社会敏感的预训练方法
面试官问:能否模拟实现JS的new操作符
Voice network VQA: make the user's subjective experience of unknown video quality in real-time interaction known
Deepmind | pre training of molecular property prediction through noise removal
MySQL - function
数据库的新选择 Amazon Aurora
The contents of the latex table are left, middle and right
Review of drug discovery-03-molecular design and optimization
Chapitre 4: redis
Is it safe to open an online futures account?
Comprehensive evaluation of free, easy-to-use and powerful open source note taking software
药物发现综述-01-药物发现概述
【牛客討論區】第四章:Redis