当前位置:网站首页>将某数据库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 字符串包含尝试更多种写法
边栏推荐
- Centos8 operation record command version Yum redis MySQL Nacos JDK
- Ten thousand words long article understanding business intelligence (BI) | recommended collection
- Web3 technology initial experience and related learning materials
- Adobe Premiere基础-常用的视频特效(裁剪,黑白,剪辑速度,镜像,镜头光晕)(十五)
- [embedded foundation] serial port communication
- Neural network of zero basis multi map detailed map
- AI+临床试验患者招募|Massive Bio完成900万美元A轮融资
- 面试官问:JS的this指向
- 想开户买股票,在网上办理股票开户安全吗?
- 205. 同构字符串
猜你喜欢
Lmsoc: a socially sensitive pre training method
Original | 2025 to achieve the "five ones" goal! The four products of Jiefang power are officially released
Meituan dynamic thread pool practice idea has been open source
万字长文看懂商业智能(BI)|推荐收藏
【牛客討論區】第四章:Redis
Maimai hot post: Why are big factories keen on making wheels?
声网 VQA:将实时互动中未知的视频画质用户主观体验变可知
什么是数字化?什么是数字化转型?为什么企业选择数字化转型?
[description] solution to JMeter garbled code
数据库的新选择 Amazon Aurora
随机推荐
有监督、无监督与半监督学习
Arrays.asList()坑
零基础多图详解图神经网络
Data analysts too hot? Monthly income 3W? Tell you the true situation of this industry with data
Is there any risk in opening an account for flush stock? Is it safe for flush to open an account
如何阅读一篇论文
Adobe Premiere foundation - sound adjustment (volume correction, noise reduction, telephone tone, pitch shifter, parameter equalizer) (XVIII)
美团动态线程池实践思路已开源
How about the market application strength of large-size conductive slip rings
centos8-操作记录-命令版-yum-redis-mysql-nacos-jdk
深入解析kubernetes controller-runtime
什麼是數字化?什麼是數字化轉型?為什麼企業選擇數字化轉型?
MySQL 18: execution of write statements
Centos8 operation record command version Yum redis MySQL Nacos JDK
同花顺股票开户是会有什么风险吗?同花顺开户安全吗
DeepMind | 通过去噪来进行分子性质预测的预训练
The contents of the latex table are left, middle and right
[description] solution to JMeter garbled code
想开户买股票,在网上办理股票开户安全吗?
完全二叉树的节点个数[非O(n)求法 -> 抽象二分]